Updated plugins

This commit is contained in:
2025-08-04 22:05:47 +02:00
parent 6019e3c79f
commit db581730d5
3 changed files with 103 additions and 104 deletions

View File

@@ -0,0 +1,21 @@
return {
"folke/flash.nvim",
event = "VeryLazy",
-- stylua: ignore
keys = {
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
},
config = function()
require("flash").setup({
modes = {
char = {
jump_labels = true,
},
},
})
end,
}

View File

@@ -11,7 +11,6 @@ return {
}, },
event = { "BufReadPre", "BufNewFile" }, event = { "BufReadPre", "BufNewFile" },
config = function() config = function()
require("lspconfig")
local tserrortranslator = require("ts-error-translator") local tserrortranslator = require("ts-error-translator")
local on_attach = require("taken.utils.on_attach") local on_attach = require("taken.utils.on_attach")
local get_python_path = require("taken.utils.lsp").get_python_path local get_python_path = require("taken.utils.lsp").get_python_path
@@ -29,18 +28,6 @@ return {
[vim.diagnostic.severity.HINT] = "", [vim.diagnostic.severity.HINT] = "",
[vim.diagnostic.severity.INFO] = "", [vim.diagnostic.severity.INFO] = "",
}, },
-- linehl = {
-- [vim.diagnostic.severity.ERROR] = "DiagnosticSignError",
-- [vim.diagnostic.severity.WARN] = "DiagnosticSignWarn",
-- [vim.diagnostic.severity.HINT] = "DiagnosticSignHint",
-- [vim.diagnostic.severity.INFO] = "DiagnosticSignInfo",
-- },
-- numhl = {
-- [vim.diagnostic.severity.ERROR] = "DiagnosticSignError",
-- [vim.diagnostic.severity.WARN] = "DiagnosticSignWarn",
-- [vim.diagnostic.severity.HINT] = "DiagnosticSignHint",
-- [vim.diagnostic.severity.INFO] = "DiagnosticSignInfo",
-- },
}) })
local defaultLsps = { local defaultLsps = {
@@ -52,6 +39,7 @@ return {
"bashls", "bashls",
"marksman", "marksman",
"eslint", "eslint",
-- "emmylua_ls",
} }
vim.lsp.config("*", { vim.lsp.config("*", {
@@ -59,13 +47,10 @@ return {
on_attach = on_attach, on_attach = on_attach,
}) })
-- vim.lsp.config("emmylua_ls", { local lsps = {
-- capabilities = capabilities, {
-- on_attach = on_attach, lsp = "lua_ls",
-- }) config = {
-- lua
vim.lsp.config("lua_ls", {
capabilities = capabilities, capabilities = capabilities,
on_attach = on_attach, on_attach = on_attach,
settings = { settings = {
@@ -87,10 +72,11 @@ return {
}, },
}, },
}, },
}) },
},
-- python {
vim.lsp.config("pyright", { lsp = "pyright",
config = {
capabilities = capabilities, capabilities = capabilities,
on_attach = on_attach, on_attach = on_attach,
before_init = function(_, config) before_init = function(_, config)
@@ -100,10 +86,11 @@ return {
end end
config.settings.python.pythonPath = get_python_path(config.root_dir) config.settings.python.pythonPath = get_python_path(config.root_dir)
end, end,
}) },
},
-- typescript {
vim.lsp.config("ts_ls", { lsp = "ts_ls",
config = {
capabilities = capabilities, capabilities = capabilities,
on_attach = on_attach, on_attach = on_attach,
settings = { settings = {
@@ -132,23 +119,24 @@ return {
}, },
}, },
}, },
}) },
},
-- powershell {
vim.lsp.config("powershell_es", { lsp = "powershell_es",
config = {
capabilities = capabilities, capabilities = capabilities,
on_attach = on_attach, on_attach = on_attach,
bundle_path = vim.fn.stdpath("data") .. "/mason/packages/powershell-editor-services", bundle_path = vim.fn.stdpath("data") .. "/mason/packages/powershell-editor-services",
}) },
},
}
vim.lsp.enable(defaultLsps) vim.lsp.enable(defaultLsps)
vim.lsp.enable({
"lua_ls", for _, l in ipairs(lsps) do
-- "emmylua_ls", vim.lsp.config(l.lsp, l.config)
"pyright", vim.lsp.enable(l.lsp)
"ts_ls", end
"powershell_es",
})
tserrortranslator.setup() tserrortranslator.setup()
end, end,

View File

@@ -10,7 +10,6 @@ return {
local mason = require("mason") local mason = require("mason")
local mason_lspconfig = require("mason-lspconfig") local mason_lspconfig = require("mason-lspconfig")
local mason_tool_installer = require("mason-tool-installer") local mason_tool_installer = require("mason-tool-installer")
-- local mason_null_ls = require("mason-null-ls")
mason.setup({ mason.setup({
ui = { ui = {
@@ -54,14 +53,5 @@ return {
}, },
automatic_installation = true, automatic_installation = true,
}) })
-- mason_null_ls.setup({
-- ensure_installed = {
-- "stylua",
-- "prettier",
-- "dprint",
-- },
-- automatic_installation = true,
-- })
end, end,
} }