feat: update nvim config
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
return {
|
||||
{ "akinsho/bufferline.nvim", enabled = false },
|
||||
{
|
||||
-- tabline
|
||||
'romgrk/barbar.nvim',
|
||||
|
||||
@@ -9,10 +9,10 @@ return {
|
||||
--"bashls",
|
||||
"shfmt",
|
||||
--"tailwindcss",
|
||||
"tsserver", -- TypeScript/JavaScript LSP
|
||||
"typescript-language-server", -- TypeScript/JavaScript LSP
|
||||
"pylyzer",
|
||||
--"cssls",
|
||||
"bufls", -- Protocol Buffers LSP
|
||||
"buf", -- Protocol Buffers LSP
|
||||
"gopls", -- Go LSP
|
||||
})
|
||||
end,
|
||||
|
||||
@@ -76,7 +76,7 @@ end
|
||||
return {
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
enable = false,
|
||||
enabled = false,
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-emoji",
|
||||
'hrsh7th/vim-vsnip',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
return {
|
||||
"leoluz/nvim-dap-go",
|
||||
keys = {
|
||||
{ "<F5>", function() require("dap").continue({ before = get_args }) end, desc = "Run with Args" },
|
||||
{ "<F5>", function() require("dap").continue() end, desc = "Run/Continue" },
|
||||
{ "<F6>",":lua require('dap-go').debug_test()<cr>", desc = "Debug Test" },
|
||||
{ "<F9>", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" },
|
||||
{ "<F10>", function() require("dap").step_over() end, desc = "Step Over" },
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
return {
|
||||
-- lsp servers
|
||||
{
|
||||
"mason-org/mason.nvim",
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
"neovim/nvim-lspconfig",
|
||||
event = { "BufReadPre", "BufReadPost", "BufNewFile" },
|
||||
opts = {
|
||||
inlay_hints = { enabled = false },
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
bufls = {}, -- Protocol Buffers LSP
|
||||
buf_ls = {},
|
||||
cssls = {},
|
||||
tailwindcss = {
|
||||
root_dir = function(...)
|
||||
@@ -28,7 +23,7 @@ return {
|
||||
)(...)
|
||||
end,
|
||||
},
|
||||
tsserver = {
|
||||
ts_ls = {
|
||||
root_dir = function(...)
|
||||
return require("lspconfig.util").root_pattern(
|
||||
"tsconfig.json",
|
||||
@@ -72,7 +67,6 @@ return {
|
||||
},
|
||||
},
|
||||
lua_ls = {
|
||||
-- enabled = false,
|
||||
single_file_support = true,
|
||||
settings = {
|
||||
Lua = {
|
||||
@@ -83,11 +77,6 @@ return {
|
||||
workspaceWord = true,
|
||||
callSnippet = "Both",
|
||||
},
|
||||
misc = {
|
||||
parameters = {
|
||||
-- "--log-level=trace",
|
||||
},
|
||||
},
|
||||
hint = {
|
||||
enable = true,
|
||||
setType = false,
|
||||
@@ -104,7 +93,6 @@ return {
|
||||
},
|
||||
diagnostics = {
|
||||
disable = { "incomplete-signature-doc", "trailing-space" },
|
||||
-- enable = false,
|
||||
groupSeverity = {
|
||||
strong = "Warning",
|
||||
strict = "Warning",
|
||||
@@ -137,7 +125,7 @@ return {
|
||||
},
|
||||
},
|
||||
gopls = {
|
||||
cmd = { "gopls", "serve" }, -- use cmd in path, I can update it easily
|
||||
cmd = { "gopls", "serve" },
|
||||
settings = {
|
||||
gopls = {
|
||||
analyses = {
|
||||
@@ -151,9 +139,7 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
pylsp = {
|
||||
cmd = { "pylyzer", "--server" },
|
||||
filetypes = { "python" },
|
||||
pylyzer = {
|
||||
settings = {
|
||||
python = {
|
||||
checkOnType = false,
|
||||
|
||||
@@ -8,6 +8,9 @@ return {
|
||||
ft = { "markdown", "mdx", "quarto", "rmd", "org" },
|
||||
---@module 'render-markdown'
|
||||
---@type render.md.UserConfig
|
||||
opts = {},
|
||||
opts = {
|
||||
-- 未安装 tectonic/pdflatex 时关闭 LaTeX 公式渲染,减少健康检查噪音
|
||||
latex = { enabled = false },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
opts = {
|
||||
image = {
|
||||
-- tmux / 部分终端不报 kitty graphics;避免 :checkhealth 里出现 ERROR(仍会 WARN)
|
||||
force = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -15,17 +15,24 @@ return {
|
||||
"graphql",
|
||||
"html",
|
||||
"java",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"markdown", -- render-markdown.nvim
|
||||
"latex",
|
||||
-- "lua", "vim", "vimdoc", "query", "markdown" 等由 Neovim 内置,
|
||||
-- 不在此安装,避免 nvim-treesitter 装的新版 parser 与内置 query 不兼容。
|
||||
"norg",
|
||||
"php",
|
||||
"proto", -- Protocol Buffers
|
||||
"regex",
|
||||
"rust",
|
||||
"scss",
|
||||
"sql",
|
||||
"svelte",
|
||||
"toml",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"typst",
|
||||
"vue",
|
||||
"yaml",
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user