]> Untitled Git - vimfiles.git/commitdiff
Switch to new lsp config syntax and add kotlin ls
authorPhilippe Hürlimann <p@hurlimann.org>
Fri, 17 Oct 2025 11:31:41 +0000 (13:31 +0200)
committerPhilippe Hürlimann <p@hurlimann.org>
Fri, 17 Oct 2025 11:31:41 +0000 (13:31 +0200)
init.vim

index 2df1199b58c69fd18d4087b2bd006a0a2e4e0085..109e2c73199585f283c2d6793b4658fafd55b7d8 100644 (file)
--- a/init.vim
+++ b/init.vim
@@ -133,12 +133,9 @@ vim.keymap.set('n', '<Leader>lf', vim.lsp.buf.format, opts)
 vim.keymap.set('n', '<Leader>ls', vim.lsp.buf.document_symbol, opts)
 vim.keymap.set('n', '<Leader>lh', vim.lsp.buf.document_highlight, opts)
 
-local lspconfig = require 'lspconfig'
-local util = require 'lspconfig.util'
+vim.lsp.config('gopls', {cmd = {'gopls', '-v', 'serve', '-debug=localhost:6060', '-logfile=/tmp/gopls.log'}})
 
-lspconfig.gopls.setup{cmd = {'gopls', '-v', 'serve', '-debug=localhost:6060', '-logfile=/tmp/gopls.log'}, root_dir = util.root_pattern("go.mod")}
-
-lspconfig.pylsp.setup{
+vim.lsp.config('pylsp', {
     cmd = {'pylsp', '-v', '--log-file','/tmp/pyls.log'},
     plugins = {
       pyflakes = {
@@ -154,14 +151,17 @@ lspconfig.pylsp.setup{
         enabled = true
       }
     },
-}
-lspconfig.perlpls.setup{cmd = {'nix-shell', '-p', 'perl538Packages.PLS', '--run', 'pls'}}
-lspconfig.ccls.setup{}
-lspconfig.rust_analyzer.setup{}
+})
+
+vim.lsp.enable('perlpls')
+vim.lsp.enable('ccls')
+vim.lsp.enable('rust_analyzer')
+vim.lsp.enable('kotlin_language_server')
+vim.lsp.enable('zls')
 
 require'nvim-treesitter.configs'.setup {
   disable = { "c" },
-  ensure_installed = { "lua", "rust", "vim", "vimdoc", "query", "markdown", "markdown_inline", "python" },
+  ensure_installed = { "kotlin", "lua", "rust", "vim", "vimdoc", "query", "markdown", "markdown_inline", "python" },
     highlight = {
     enable = false,
     },