Skip to content

Commit

Permalink
Fix actions
Browse files Browse the repository at this point in the history
  • Loading branch information
esensar committed Apr 30, 2024
1 parent dfc2745 commit dc62ebe
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 6 deletions.
1 change: 1 addition & 0 deletions symlinks/config/nvim/after/ftplugin/scala.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require("esensar.lsp.metals_setup").setup()
1 change: 1 addition & 0 deletions symlinks/config/nvim/lua/esensar/init/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ return require("lazy").setup({
"akinsho/flutter-tools.nvim", -- Additional flutter integrations
{ "mrcjkb/rustaceanvim", ft = "rust" }, -- Additional rust integrations
{ "mfussenegger/nvim-jdtls", ft = "java" }, -- Additional java integrations
"scalameta/nvim-metals", -- Scala

-- Lua support
"nvim-lua/popup.nvim", -- Popup API integration - needed for some plugins
Expand Down
5 changes: 5 additions & 0 deletions symlinks/config/nvim/lua/esensar/lsp/diagnostic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ require("formatter").setup({
},
kotlin = {
require("formatter.filetypes.kotlin").ktlint,
require("formatter.filetypes.kotlin").detekt,
},
cpp = {
require("formatter.filetypes.cpp").clangformat,
Expand Down Expand Up @@ -41,6 +42,10 @@ require("formatter").setup({
godot = {
require("esensar.lsp.formatters.gdformat"),
},
xml = {
require("formatter.filetypes.xml").xmlformat,
require("formatter.filetypes.xml").xmllint,
},
["*"] = {
require("formatter.filetypes.any").remove_trailing_whitespace,
},
Expand Down
4 changes: 2 additions & 2 deletions symlinks/config/nvim/lua/esensar/lsp/formatters/gdformat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ return {
exe = "gdformat",
args = {
"--diff",
"-"
"-",
},
stdin = true
stdin = true,
}
15 changes: 15 additions & 0 deletions symlinks/config/nvim/lua/esensar/lsp/metals_setup.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-------------------------------------------------------------------------------
-- - Metals server configuration -
-------------------------------------------------------------------------------

local common_config = require("esensar.lsp.server_config")
local M = {}

local metals_config = require("metals").bare_config()
metals_config.on_attach = common_config.on_attach

function M.setup()
require("metals").initialize_or_attach(metals_config)
end

return M
2 changes: 1 addition & 1 deletion symlinks/config/nvim/lua/esensar/lsp/server_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ local function on_attach(client, bufnr)
end

if vim.fn.has("nvim-0.10") then
vim.lsp.inlay_hint.enable(bufnr, true)
vim.lsp.inlay_hint.enable(true, { bufnr = bufnr })
end
end

Expand Down
5 changes: 3 additions & 2 deletions symlinks/config/nvim/lua/esensar/lsp/servers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
require("neodev").setup({
library = { plugins = { "neotest", "plenary.nvim" }, types = true },
-- Always add neovim plugins into lua_ls library, even if not neovim config
override = function(root_dir, library)
override = function(_, library)
library.enabled = true
library.plugins = true
end,
Expand Down Expand Up @@ -55,6 +55,7 @@ local servers = {
"crystalline",
"cucumber_language_server",
"dockerls",
"dotls",
"gdscript",
"gopls",
"hls",
Expand Down Expand Up @@ -90,7 +91,7 @@ vim.g.rustaceanvim = {
on_attach = function(client, bufnr)
common_config.on_attach(client, bufnr)
end,
cmd = {"ra-multiplex"},
cmd = { "ra-multiplex" },
-- init_options = {
-- lspMux = {
-- version = "1",
Expand Down
2 changes: 1 addition & 1 deletion symlinks/config/nvim/plugin/snippets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ local function jdocsnip(args, _, old_state)
end
vim.list_extend(nodes, { t({ " * ", " * @throws " .. exc .. " " }), ins, t({ "", "" }) })
param_nodes.ex = ins
insert = insert + 1
-- insert = insert + 1
end

vim.list_extend(nodes, { t({ " */" }) })
Expand Down

0 comments on commit dc62ebe

Please sign in to comment.