native-lsp fixes
This commit is contained in:
1 parent
5b71bcc21e
commit
8d03d7f0ed
4 files changed
+121
-8
No files matched your search
@@ -69,18 +69,80 @@ for _, name in pairs(NV_DARCULA_MASON_LSP_LIST) do
|
||||
}
|
||||
}
|
||||
|
||||
vim.lsp.config(name, {capabilities = cspell_capabilities})
|
||||
vim.lsp.config(
|
||||
name,
|
||||
{
|
||||
capabilities = cspell_capabilities,
|
||||
init_options = {
|
||||
defaultSettings = {
|
||||
enabledLanguageIds = NV_DARCULA_CSPELL_LANGUAGES,
|
||||
import = {"./"}
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
elseif name == "jdtls" then
|
||||
local lombok =
|
||||
vim.fs.joinpath(
|
||||
vim.fn.stdpath("data"),
|
||||
"mason",
|
||||
"packages",
|
||||
"jdtls",
|
||||
"lombok.jar"
|
||||
)
|
||||
vim.env.JDTLS_JVM_ARGS =
|
||||
table.concat(
|
||||
{
|
||||
"-XX:+UseParallelGC",
|
||||
"-XX:GCTimeRatio=4",
|
||||
"-XX:AdaptiveSizePolicyWeight=90",
|
||||
"-Dsun.zip.disableMemoryMapping=true",
|
||||
"-Xmx4G",
|
||||
"-Xms4G",
|
||||
"-Xlog:disable",
|
||||
"-javaagent:" .. lombok
|
||||
},
|
||||
" "
|
||||
)
|
||||
|
||||
vim.lsp.config(
|
||||
name,
|
||||
{
|
||||
settings = {
|
||||
java = {
|
||||
import = {maven = {enabled = true}},
|
||||
jdt = {
|
||||
ls = {
|
||||
lombokSupport = {enabled = true},
|
||||
vmargs = vim.env.JDTLS_JVM_ARGS
|
||||
}
|
||||
},
|
||||
maven = {
|
||||
downloadSources = false,
|
||||
updateSnapshots = true
|
||||
},
|
||||
referencesCodeLens = {enabled = NV_DARCULA_ENABLE_CODE_LENS},
|
||||
trace = {server = "verbose"}
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
elseif name == "lua_ls" then
|
||||
vim.lsp.config(
|
||||
name,
|
||||
{
|
||||
settings = {
|
||||
Lua = {
|
||||
codeLens = {enable = NV_DARCULA_ENABLE_CODE_LENS},
|
||||
completion = {
|
||||
callSnippet = "Replace",
|
||||
keywordSnippet = "Both"
|
||||
},
|
||||
diagnostics = {globals = NV_DARCULA_LUA_GLOBALS},
|
||||
diagnostics = {
|
||||
globals = NV_DARCULA_LUA_GLOBALS,
|
||||
workspaceDelay = 30000
|
||||
},
|
||||
hint = {enable = NV_DARCULA_ENABLE_INLAY_HINTS},
|
||||
runtime = {
|
||||
version = "LuaJIT"
|
||||
},
|
||||
@@ -97,9 +159,9 @@ for _, name in pairs(NV_DARCULA_MASON_LSP_LIST) do
|
||||
-- "core",
|
||||
-- "opt"
|
||||
-- )
|
||||
}
|
||||
-- maxPreload = 1000,
|
||||
-- preloadFileSize = 200
|
||||
},
|
||||
maxPreload = 10000,
|
||||
preloadFileSize = 3000
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ utils.augroup_with_autocmd(
|
||||
end
|
||||
|
||||
if client:supports_method("textDocument/inlayHint") then
|
||||
vim.lsp.inlay_hint.enable(NV_DARCULA_ENABLE_INLAY_HINTS)
|
||||
vim.lsp.inlay_hint.enable(NV_DARCULA_ENABLE_INLAY_HINTS, {bufnr = ev.buf})
|
||||
end
|
||||
|
||||
require("darcula.keymaps").lsp_on_attach(ev)
|
||||
|
||||
@@ -28,12 +28,14 @@ require("nvim-lightbulb").setup(
|
||||
hide_in_unfocused_buffer = true,
|
||||
link_highlights = false,
|
||||
sign = {
|
||||
enabled = true,
|
||||
enabled = not NV_DARCULA_ENABLE_VIRTUAL_TEXT,
|
||||
text = symbols.status.info,
|
||||
hl = "WarningSign"
|
||||
},
|
||||
virtual_text = {
|
||||
enabled = false
|
||||
enabled = NV_DARCULA_ENABLE_VIRTUAL_TEXT,
|
||||
text = symbols.status.info,
|
||||
hl = "DiagnosticVirtualTextInfo"
|
||||
},
|
||||
float = {
|
||||
enabled = false
|
||||
|
||||
Reference in new issue
Block a user