Metals fixes
This commit is contained in:
parent
a5b42bbcb2
commit
72e2f8b70b
2 changed files with 17 additions and 1 deletions
2
home.nix
2
home.nix
|
@ -181,6 +181,7 @@
|
||||||
pkgs.asciinema
|
pkgs.asciinema
|
||||||
pkgs.aspell
|
pkgs.aspell
|
||||||
pkgs.awscli
|
pkgs.awscli
|
||||||
|
pkgs.bloop
|
||||||
pkgs.cabal-install
|
pkgs.cabal-install
|
||||||
pkgs.cmake
|
pkgs.cmake
|
||||||
pkgs.coursier
|
pkgs.coursier
|
||||||
|
@ -222,6 +223,7 @@
|
||||||
pkgs.readline
|
pkgs.readline
|
||||||
pkgs.ripgrep
|
pkgs.ripgrep
|
||||||
pkgs.rnix-lsp
|
pkgs.rnix-lsp
|
||||||
|
pkgs.sbt
|
||||||
pkgs.shellcheck
|
pkgs.shellcheck
|
||||||
pkgs.stylua
|
pkgs.stylua
|
||||||
pkgs.sumneko-lua-language-server
|
pkgs.sumneko-lua-language-server
|
||||||
|
|
|
@ -346,12 +346,26 @@ _G.load_config = function()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- metals
|
-- metals
|
||||||
|
vim.g.metals_server_version = '0.10.5+64-3c83447e-SNAPSHOT'
|
||||||
vim.opt_global.shortmess:remove('F'):append 'c'
|
vim.opt_global.shortmess:remove('F'):append 'c'
|
||||||
Metals_config = require('metals').bare_config
|
Metals_config = require('metals').bare_config
|
||||||
|
Metals_config.settings = {
|
||||||
|
showImplicitArguments = true,
|
||||||
|
showInferredType = true,
|
||||||
|
bloopSbtAlreadyInstalled = true,
|
||||||
|
excludedPackages = {
|
||||||
|
"akka.actor.typed.javadsl",
|
||||||
|
"com.github.swagger.akka.javadsl",
|
||||||
|
"akka.stream.javadsl",
|
||||||
|
},
|
||||||
|
fallbackScalaVersion = "2.13.6",
|
||||||
|
superMethodLensesEnabled = true,
|
||||||
|
javaHome = "~/.nix-profile"
|
||||||
|
}
|
||||||
Metals_config.init_options.statusBarProvider = 'on'
|
Metals_config.init_options.statusBarProvider = 'on'
|
||||||
vim.cmd [[augroup lsp]]
|
vim.cmd [[augroup lsp]]
|
||||||
vim.cmd [[au!]]
|
vim.cmd [[au!]]
|
||||||
vim.cmd [[au FileType scala,sbt lua require("metals").initialize_or_attach(metals_config)]]
|
vim.cmd [[au FileType scala,sbt lua require("metals").initialize_or_attach(Metals_config)]]
|
||||||
vim.cmd [[augroup end]]
|
vim.cmd [[augroup end]]
|
||||||
|
|
||||||
-- Map :Format to vim.lsp.buf.formatting()
|
-- Map :Format to vim.lsp.buf.formatting()
|
||||||
|
|
Loading…
Reference in a new issue