fix: modify mason server

This commit is contained in:
2024-06-12 17:49:36 +08:00
parent a9f48d2d59
commit d97fb14d1f
2 changed files with 36 additions and 33 deletions
+6 -4
View File
@@ -6,12 +6,14 @@ return {
"stylua", "stylua",
"selene", "selene",
"luacheck", "luacheck",
"shellcheck", "bashls",
"shfmt", "shfmt",
"tailwindcss-language-server", "tailwindcss",
"typescript-language-server", "tsserver",
"css-lsp", "pylyzer",
"cssls",
}) })
end, end,
}, },
} }
+18 -17
View File
@@ -1,5 +1,5 @@
local function my_on_attach(bufnr) local function my_on_attach(bufnr)
local api = require "nvim-tree.api" local api = require("nvim-tree.api")
local function opts(desc) local function opts(desc)
return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true } return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
@@ -9,30 +9,30 @@ local function my_on_attach(bufnr)
api.config.mappings.default_on_attach(bufnr) api.config.mappings.default_on_attach(bufnr)
-- custom mappings -- custom mappings
vim.keymap.set('n', '<C-t>', api.tree.change_root_to_parent, opts('Up')) vim.keymap.set("n", "<C-t>", api.tree.change_root_to_parent, opts("Up"))
vim.keymap.set('n', '?', api.tree.toggle_help, opts('Help')) vim.keymap.set("n", "?", api.tree.toggle_help, opts("Help"))
vim.keymap.set('n', 'l', api.node.open.edit, opts('Edit')) vim.keymap.set("n", "l", api.node.open.edit, opts("Edit"))
vim.keymap.set('n', 'h', api.node.navigate.parent_close, opts('Parent Close')) vim.keymap.set("n", "h", api.node.navigate.parent_close, opts("Parent Close"))
vim.keymap.set('n', 's', api.node.open.horizontal, opts('Horizontal Split')) vim.keymap.set("n", "s", api.node.open.horizontal, opts("Horizontal Split"))
vim.keymap.set('n', 'v', api.node.open.vertical, opts('Vertical Split')) vim.keymap.set("n", "v", api.node.open.vertical, opts("Vertical Split"))
vim.keymap.set("n", "<S-r>", api.tree.reload, opts("Reload"))
end end
vim.g.nvim_tree_indent_markers = 1 -- "0 by default, this option shows indent markers when folders are open vim.g.nvim_tree_indent_markers = 1 -- "0 by default, this option shows indent markers when folders are open
vim.g.nvim_tree_auto_ignore_ft = 'startify' --empty by default, don't auto open tree on specific filetypes. vim.g.nvim_tree_auto_ignore_ft = "startify" --empty by default, don't auto open tree on specific filetypes.
vim.g.nvim_tree_icons = { vim.g.nvim_tree_icons = {
default = '', default = "",
symlink = '', symlink = "",
git = {unstaged = "", staged = "✓", unmerged = "", renamed = "➜", untracked = ""}, git = { unstaged = "", staged = "✓", unmerged = "", renamed = "➜", untracked = "" },
folder = {default = "", open = "", empty = "", empty_open = "", symlink = ""} folder = { default = "", open = "", empty = "", empty_open = "", symlink = "" },
} }
return { return {
{ {
'nvim-tree/nvim-tree.lua', "nvim-tree/nvim-tree.lua",
dependencies = { dependencies = {
'nvim-tree/nvim-web-devicons', -- optional "nvim-tree/nvim-web-devicons", -- optional
}, },
opts = { opts = {
on_attach = my_on_attach, on_attach = my_on_attach,
@@ -41,7 +41,7 @@ return {
--auto_close = false, --auto_close = false,
filters = { filters = {
dotfiles = false, dotfiles = false,
custom = {} custom = {},
}, },
git = { git = {
enable = true, enable = true,
@@ -56,8 +56,9 @@ return {
update_cwd = false, update_cwd = false,
-- list of buffer names / filetypes that will not update the cwd if the file isn't found under the current root directory -- list of buffer names / filetypes that will not update the cwd if the file isn't found under the current root directory
-- only relevant when `update_focused_file.update_cwd` is true and `update_focused_file.enable` is true -- only relevant when `update_focused_file.update_cwd` is true and `update_focused_file.enable` is true
ignore_list = {} ignore_list = {},
}, },
}, },
}, },
} }