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
{ "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

View File

@ -10,6 +10,7 @@ require("formatter").setup({
},
kotlin = {
require("formatter.filetypes.kotlin").ktlint,
require("formatter.filetypes.kotlin").detekt,
},
cpp = {
require("formatter.filetypes.cpp").clangformat,
@ -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,
},

View File

@ -2,7 +2,7 @@ return {
exe = "gdformat",
args = {
"--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
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

View File

@ -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,
@ -55,6 +55,7 @@ local servers = {
"crystalline",
"cucumber_language_server",
"dockerls",
"dotls",
"gdscript",
"gopls",
"hls",

View File

@ -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({ " */" }) })