Browse Source

nixpkgs/neovim: add support for java

Thomas Dy 1 month ago
parent
commit
28207159b2
2 changed files with 15 additions and 0 deletions
  1. 11 0
      .config/nixpkgs/neovim/lsp.lua
  2. 4 0
      .config/nixpkgs/neovim/treesitter/grammars.json

+ 11 - 0
.config/nixpkgs/neovim/lsp.lua

@@ -109,6 +109,17 @@ if vim.fn.executable("nil") == 1 then
   });
 end
 
+if vim.fn.executable("jdtls") == 1 then
+  nvim_lsp.jdtls.setup({
+    on_attach = on_attach,
+    handlers = {
+      ["$/progress"] = function()
+        -- this is quite noisy so just disable it
+      end
+    },
+  });
+end
+
 -- format on save
 local group = vim.api.nvim_create_augroup('LspFormatting', { clear = false })
 

+ 4 - 0
.config/nixpkgs/neovim/treesitter/grammars.json

@@ -68,5 +68,9 @@
     "repo": "neovim/tree-sitter-vimdoc",
     "rev": "016ad75faa854e4e13bc40c517015183b795eed9",
     "sha256": "1gia88qfyzfxaypv75vcqs2p3k1mn4kq0a3zqj52sw58zqim5s5z"
+  },
+  "java": {
+    "rev": "99b29f1ed957b3b424b6e21f57bd21a9732a622a",
+    "sha256": "1i776ikfdg70fnsg5sih3bf3pxgjyqwyhd122b3cxp4dxxfds3fq"
   }
 }