Fix actions

main
Ensar Sarajčić 2024-04-30 14:11:31 +02:00
parent dfc2745dcb
commit dc62ebeb78
8 changed files with 29 additions and 6 deletions

View File

@ -0,0 +1 @@
require("esensar.lsp.metals_setup").setup()

View File

@ -154,6 +154,7 @@ return require("lazy").setup({
"akinsho/flutter-tools.nvim", -- Additional flutter integrations "akinsho/flutter-tools.nvim", -- Additional flutter integrations
{ "mrcjkb/rustaceanvim", ft = "rust" }, -- Additional rust integrations { "mrcjkb/rustaceanvim", ft = "rust" }, -- Additional rust integrations
{ "mfussenegger/nvim-jdtls", ft = "java" }, -- Additional java integrations { "mfussenegger/nvim-jdtls", ft = "java" }, -- Additional java integrations
"scalameta/nvim-metals", -- Scala
-- Lua support -- Lua support
"nvim-lua/popup.nvim", -- Popup API integration - needed for some plugins "nvim-lua/popup.nvim", -- Popup API integration - needed for some plugins

View File

@ -10,6 +10,7 @@ require("formatter").setup({
}, },
kotlin = { kotlin = {
require("formatter.filetypes.kotlin").ktlint, require("formatter.filetypes.kotlin").ktlint,
require("formatter.filetypes.kotlin").detekt,
}, },
cpp = { cpp = {
require("formatter.filetypes.cpp").clangformat, require("formatter.filetypes.cpp").clangformat,
@ -41,6 +42,10 @@ require("formatter").setup({
godot = { godot = {
require("esensar.lsp.formatters.gdformat"), require("esensar.lsp.formatters.gdformat"),
}, },
xml = {
require("formatter.filetypes.xml").xmlformat,
require("formatter.filetypes.xml").xmllint,
},
["*"] = { ["*"] = {
require("formatter.filetypes.any").remove_trailing_whitespace, require("formatter.filetypes.any").remove_trailing_whitespace,
}, },

View File

@ -2,7 +2,7 @@ return {
exe = "gdformat", exe = "gdformat",
args = { args = {
"--diff", "--diff",
"-" "-",
}, },
stdin = true stdin = true,
} }

View File

@ -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

View File

@ -41,7 +41,7 @@ local function on_attach(client, bufnr)
end end
if vim.fn.has("nvim-0.10") then 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
end end

View File

@ -5,7 +5,7 @@
require("neodev").setup({ require("neodev").setup({
library = { plugins = { "neotest", "plenary.nvim" }, types = true }, library = { plugins = { "neotest", "plenary.nvim" }, types = true },
-- Always add neovim plugins into lua_ls library, even if not neovim config -- 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.enabled = true
library.plugins = true library.plugins = true
end, end,
@ -55,6 +55,7 @@ local servers = {
"crystalline", "crystalline",
"cucumber_language_server", "cucumber_language_server",
"dockerls", "dockerls",
"dotls",
"gdscript", "gdscript",
"gopls", "gopls",
"hls", "hls",
@ -90,7 +91,7 @@ vim.g.rustaceanvim = {
on_attach = function(client, bufnr) on_attach = function(client, bufnr)
common_config.on_attach(client, bufnr) common_config.on_attach(client, bufnr)
end, end,
cmd = {"ra-multiplex"}, cmd = { "ra-multiplex" },
-- init_options = { -- init_options = {
-- lspMux = { -- lspMux = {
-- version = "1", -- version = "1",

View File

@ -105,7 +105,7 @@ local function jdocsnip(args, _, old_state)
end end
vim.list_extend(nodes, { t({ " * ", " * @throws " .. exc .. " " }), ins, t({ "", "" }) }) vim.list_extend(nodes, { t({ " * ", " * @throws " .. exc .. " " }), ins, t({ "", "" }) })
param_nodes.ex = ins param_nodes.ex = ins
insert = insert + 1 -- insert = insert + 1
end end
vim.list_extend(nodes, { t({ " */" }) }) vim.list_extend(nodes, { t({ " */" }) })