feat: extra lsp stuff for java

This commit is contained in:
əlemi 2023-01-26 21:26:44 +01:00
parent a9372aa225
commit 2b19d6910a
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 7 additions and 0 deletions

6
ftplugin/java.lua Normal file
View file

@ -0,0 +1,6 @@
local nvim_jdtls = require("jdtls")
nvim_jdtls.start_or_attach({
cmd = { 'jdtls' },
root_dir = vim.fs.dirname(vim.fs.find({'.gradlew', '.git', 'mvnw'}, {upward = true})[1]),
})
require('keybinds'):set_lsp_keys({})

View file

@ -42,6 +42,7 @@ local init_fn = function(use)
use 'neovim/nvim-lspconfig' -- import LSP configurations
use 'simrat39/rust-tools.nvim' -- extra LSP defaults for rust
use 'mfussenegger/nvim-jdtls' -- extra LSP stuff for java
use 'L3MON4D3/LuaSnip' -- snippet engine