Created
October 8, 2022 02:48
-
-
Save amiralies/958278cc181c84acb22fa064222717f5 to your computer and use it in GitHub Desktop.
Ensime TNG nvim lspconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local configs = require 'lspconfig.configs' | |
local lspconfig = require 'lspconfig' | |
-- Check if the config is already defined (useful when reloading this file) | |
if not configs.ensime then | |
configs.ensime = { | |
default_config = { | |
cmd = { | |
'java', '-jar', os.getenv("HOME") .. '/.cache/ensime/lib/ensime-lsp.jar' | |
}, | |
filetypes = {'scala'}, | |
root_dir = function(fname) | |
return lspconfig.util.find_git_ancestor(fname) | |
end, | |
settings = {} | |
} | |
} | |
end | |
-- call `setup()` to enable the FileType autocmd | |
require'lspconfig'.ensime.setup {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@ckipp01 check out the README for details. The compiler plugin extracts the build information, and it can reconcile all the open files that belong to the same compilation module. The build tool's definition of the project is irrelevant.