26 lines
1.2 KiB
Lua
26 lines
1.2 KiB
Lua
vim.pack.add({
|
|
{ src = "https://github.com/nabekou29/js-i18n.nvim", version = "v0.5.4" },
|
|
"https://github.com/nvim-lua/plenary.nvim",
|
|
})
|
|
|
|
local I18n = require("js-i18n")
|
|
|
|
vim.opt.conceallevel = 2
|
|
|
|
I18n.setup({
|
|
primary_language = { "en" }, -- The default language to display (initial setting for displaying virtual text, etc.)
|
|
translation_source = { "**/{messages}/*.json" }, -- Pattern for translation resources
|
|
respect_gitignore = true, -- Whether to respect .gitignore when retrieving translation resources and implementation files. Setting to false may improve performance.
|
|
-- detect_language = ..., -- Function to detect the language. By default, a function that detects the language heuristically from the file name is used.
|
|
key_separator = ".", -- Key separator
|
|
virt_text = {
|
|
enabled = true, -- Enable virtual text display
|
|
conceal_key = true, -- Hide keys and display only translations
|
|
max_length = 20, -- Maximum length of virtual text. 0 means unlimited.
|
|
max_width = 0, -- Maximum width of virtual text. 0 means unlimited. (`max_length` takes precedence.)
|
|
},
|
|
diagnostic = {
|
|
enabled = true, -- Enable the display of diagnostic information
|
|
severity = vim.diagnostic.severity.WARN, -- Severity level of diagnostic information
|
|
},
|
|
})
|