Updated plugins
This commit is contained in:
21
lua/taken/plugins/flash.lua
Normal file
21
lua/taken/plugins/flash.lua
Normal 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,
|
||||||
|
}
|
||||||
@@ -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,96 +47,96 @@ 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 = {
|
||||||
|
capabilities = capabilities,
|
||||||
-- lua
|
on_attach = on_attach,
|
||||||
vim.lsp.config("lua_ls", {
|
settings = {
|
||||||
capabilities = capabilities,
|
Lua = {
|
||||||
on_attach = on_attach,
|
hint = {
|
||||||
settings = {
|
enable = true,
|
||||||
Lua = {
|
},
|
||||||
hint = {
|
runtime = {
|
||||||
enable = true,
|
version = "LuaJIT",
|
||||||
},
|
},
|
||||||
runtime = {
|
diagnostics = {
|
||||||
version = "LuaJIT",
|
globals = { "vim" },
|
||||||
},
|
},
|
||||||
diagnostics = {
|
completion = {
|
||||||
globals = { "vim" },
|
callSnippet = "Replace",
|
||||||
},
|
},
|
||||||
completion = {
|
format = {
|
||||||
callSnippet = "Replace",
|
enable = false,
|
||||||
},
|
},
|
||||||
format = {
|
},
|
||||||
enable = false,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
{
|
||||||
|
lsp = "pyright",
|
||||||
-- python
|
config = {
|
||||||
vim.lsp.config("pyright", {
|
capabilities = capabilities,
|
||||||
capabilities = capabilities,
|
on_attach = on_attach,
|
||||||
on_attach = on_attach,
|
before_init = function(_, config)
|
||||||
before_init = function(_, config)
|
local python_path = get_python_path(config.root_dir)
|
||||||
local python_path = get_python_path(config.root_dir)
|
if python_path == nil then
|
||||||
if python_path == nil then
|
return
|
||||||
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", {
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
|
||||||
settings = {
|
|
||||||
typescript = {
|
|
||||||
inlayHints = {
|
|
||||||
includeInlayParameterNameHints = "all",
|
|
||||||
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
|
|
||||||
includeInlayFunctionParameterTypeHints = true,
|
|
||||||
includeInlayVariableTypeHints = true,
|
|
||||||
includeInlayVariableTypeHintsWhenTypeMatchesName = true,
|
|
||||||
includeInlayPropertyDeclarationTypeHints = true,
|
|
||||||
includeInlayFunctionLikeReturnTypeHints = true,
|
|
||||||
includeInlayEnumMemberValueHints = true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
javascript = {
|
},
|
||||||
inlayHints = {
|
{
|
||||||
includeInlayParameterNameHints = "all",
|
lsp = "ts_ls",
|
||||||
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
|
config = {
|
||||||
includeInlayFunctionParameterTypeHints = true,
|
capabilities = capabilities,
|
||||||
includeInlayVariableTypeHints = true,
|
on_attach = on_attach,
|
||||||
includeInlayVariableTypeHintsWhenTypeMatchesName = true,
|
settings = {
|
||||||
includeInlayPropertyDeclarationTypeHints = true,
|
typescript = {
|
||||||
includeInlayFunctionLikeReturnTypeHints = true,
|
inlayHints = {
|
||||||
includeInlayEnumMemberValueHints = true,
|
includeInlayParameterNameHints = "all",
|
||||||
|
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
|
||||||
|
includeInlayFunctionParameterTypeHints = true,
|
||||||
|
includeInlayVariableTypeHints = true,
|
||||||
|
includeInlayVariableTypeHintsWhenTypeMatchesName = true,
|
||||||
|
includeInlayPropertyDeclarationTypeHints = true,
|
||||||
|
includeInlayFunctionLikeReturnTypeHints = true,
|
||||||
|
includeInlayEnumMemberValueHints = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
javascript = {
|
||||||
|
inlayHints = {
|
||||||
|
includeInlayParameterNameHints = "all",
|
||||||
|
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
|
||||||
|
includeInlayFunctionParameterTypeHints = true,
|
||||||
|
includeInlayVariableTypeHints = true,
|
||||||
|
includeInlayVariableTypeHintsWhenTypeMatchesName = true,
|
||||||
|
includeInlayPropertyDeclarationTypeHints = true,
|
||||||
|
includeInlayFunctionLikeReturnTypeHints = true,
|
||||||
|
includeInlayEnumMemberValueHints = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
{
|
||||||
|
lsp = "powershell_es",
|
||||||
-- powershell
|
config = {
|
||||||
vim.lsp.config("powershell_es", {
|
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,
|
||||||
|
|||||||
@@ -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,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user