mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-22 08:53:31 +02:00
add: config kotlin language server
This commit is contained in:
parent
055e75a4b8
commit
e22c111d5d
2 changed files with 29 additions and 7 deletions
|
@ -2,3 +2,25 @@ vim.opt_local.expandtab = true
|
|||
vim.opt_local.shiftwidth = 4
|
||||
vim.opt_local.tabstop = 4
|
||||
vim.opt_local.softtabstop = 4
|
||||
|
||||
local lspconfig_status_ok, lspconfig = pcall(require, "lspconfig")
|
||||
if not lspconfig_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
lspconfig.kotlin_language_server.setup({
|
||||
on_attach = require("user.lsp.handlers").on_attach,
|
||||
capabilities = require("user.lsp.handlers").capabilities,
|
||||
cmd = { "kotlin-language-server" },
|
||||
filetypes = { "kotlin" },
|
||||
root_dir = require("lspconfig.util").root_pattern(
|
||||
"build.gradle.kts",
|
||||
"build.gradle",
|
||||
"settings.gradle",
|
||||
"gradlew",
|
||||
"pom.xml",
|
||||
"build.gradle.kts",
|
||||
"build.kts",
|
||||
".git"
|
||||
),
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue