nvim update
This commit is contained in:
@@ -1,26 +1,25 @@
|
|||||||
{
|
{
|
||||||
"atone.nvim": { "branch": "main", "commit": "7a0a9a4b185a72f99e47e7ac8bf0a311760e0940" },
|
|
||||||
"auto-session": { "branch": "main", "commit": "62437532b38495551410b3f377bcf4aaac574ebe" },
|
"auto-session": { "branch": "main", "commit": "62437532b38495551410b3f377bcf4aaac574ebe" },
|
||||||
"barbar.nvim": { "branch": "master", "commit": "539d73def39c9172b4d4d769f14090e08f37b29d" },
|
"barbar.nvim": { "branch": "master", "commit": "539d73def39c9172b4d4d769f14090e08f37b29d" },
|
||||||
"blink.cmp": { "branch": "main", "commit": "451168851e8e2466bc97ee3e026c3dcb9141ce07" },
|
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
||||||
"claudecode.nvim": { "branch": "main", "commit": "432121f0f5b9bda041030d1e9e83b7ba3a93dd8f" },
|
"claudecode.nvim": { "branch": "main", "commit": "432121f0f5b9bda041030d1e9e83b7ba3a93dd8f" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
|
"conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
|
||||||
"fzf-lua": { "branch": "main", "commit": "c9e7b7bfbd01f949164988ee1684035468e1995c" },
|
"fzf-lua": { "branch": "main", "commit": "9f0432fdd7825ab163520045831a40b6df82ea28" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "e1fb5425c8812214209b3f24eaa582c6c552cf98" },
|
"gitsigns.nvim": { "branch": "main", "commit": "0d797daee85366bc242580e352a4f62d67557b84" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||||
"lazygit.nvim": { "branch": "main", "commit": "a04ad0dbc725134edbee3a5eea29290976695357" },
|
"lazygit.nvim": { "branch": "main", "commit": "a04ad0dbc725134edbee3a5eea29290976695357" },
|
||||||
"leap.nvim": { "branch": "main", "commit": "b960d5038c5c505c52e56a54490f9bbb1f0e6ef6" },
|
"leap.nvim": { "branch": "main", "commit": "b960d5038c5c505c52e56a54490f9bbb1f0e6ef6" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
"lualine.nvim": { "branch": "master", "commit": "8811f3f3f4dc09d740c67e9ce399e7a541e2e5b2" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "25f609e7fca78af7cede4f9fa3af8a94b1c4950b" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "25f609e7fca78af7cede4f9fa3af8a94b1c4950b" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
"mason.nvim": { "branch": "main", "commit": "b03fb0f20bc1d43daf558cda981a2be22e73ac42" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "85bbfad83f804f11688d1ab9486b459e699292d6" },
|
"nvim-cmp": { "branch": "main", "commit": "85bbfad83f804f11688d1ab9486b459e699292d6" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "8e2084bf5e40c79c1f42210a6ef96a0a4793a763" },
|
"nvim-lspconfig": { "branch": "master", "commit": "bedca8b426b2fee0ccac596d167d71bbe971253f" },
|
||||||
"nvim-navic": { "branch": "master", "commit": "f5eba192f39b453675d115351808bd51276d9de5" },
|
"nvim-navic": { "branch": "master", "commit": "f5eba192f39b453675d115351808bd51276d9de5" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" },
|
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
|
"nvim-web-devicons": { "branch": "master", "commit": "95b7a002d5dba1a42eb58f5fac5c565a485eefd0" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||||
"snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" },
|
"snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" },
|
||||||
"tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "ba133b3e932416e4b9507095731a6d7276878fe8" },
|
"tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "57a0eb84b2008c76e77930639890d9874195b1e1" },
|
||||||
"vgit.nvim": { "branch": "main", "commit": "7e147e8cb2f160ae3c8d353005666f636d34acb2" },
|
"vgit.nvim": { "branch": "main", "commit": "7e147e8cb2f160ae3c8d353005666f636d34acb2" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" },
|
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" },
|
||||||
"yazi.nvim": { "branch": "main", "commit": "172bd64a4c2d3adbe2e0ef56289f47ffe139ca55" },
|
"yazi.nvim": { "branch": "main", "commit": "172bd64a4c2d3adbe2e0ef56289f47ffe139ca55" },
|
||||||
|
|||||||
@@ -4,6 +4,16 @@ local autocmd = vim.api.nvim_create_autocmd
|
|||||||
|
|
||||||
autocmd({ "BufRead", "BufNewFile" }, { pattern = "*.wesl", command = "setfiletype wesl" })
|
autocmd({ "BufRead", "BufNewFile" }, { pattern = "*.wesl", command = "setfiletype wesl" })
|
||||||
|
|
||||||
|
-- Start treesitter highlighting for any buffer with an available parser
|
||||||
|
autocmd("FileType", {
|
||||||
|
callback = function(args)
|
||||||
|
local lang = vim.treesitter.language.get_lang(args.match)
|
||||||
|
if lang and vim.treesitter.language.add(lang) then
|
||||||
|
vim.treesitter.start(args.buf, lang)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
-- Register wgsl as the treesitter language for wesl files
|
-- Register wgsl as the treesitter language for wesl files
|
||||||
vim.treesitter.language.register("wgsl", "wesl")
|
vim.treesitter.language.register("wgsl", "wesl")
|
||||||
|
|
||||||
|
|||||||
@@ -118,6 +118,3 @@ require("fzf-lua").setup({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Setup fzf-lua as vim.ui.select provider
|
|
||||||
require("fzf-lua").register_ui_select()
|
|
||||||
|
|||||||
@@ -1,24 +1,6 @@
|
|||||||
-- LSP capabilities (with blink.cmp completion support)
|
-- LSP capabilities (blink.cmp augments these automatically)
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
|
||||||
capabilities.textDocument.completion.completionItem = {
|
|
||||||
documentationFormat = { "markdown", "plaintext" },
|
|
||||||
snippetSupport = true,
|
|
||||||
preselectSupport = true,
|
|
||||||
insertReplaceSupport = true,
|
|
||||||
labelDetailsSupport = true,
|
|
||||||
deprecatedSupport = true,
|
|
||||||
commitCharactersSupport = true,
|
|
||||||
tagSupport = { valueSet = { 1 } },
|
|
||||||
resolveSupport = {
|
|
||||||
properties = {
|
|
||||||
"documentation",
|
|
||||||
"detail",
|
|
||||||
"additionalTextEdits",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- on_attach function with LSP keybindings
|
-- on_attach function with LSP keybindings
|
||||||
local on_attach = function(client, bufnr)
|
local on_attach = function(client, bufnr)
|
||||||
-- Attach navic for breadcrumb tracking
|
-- Attach navic for breadcrumb tracking
|
||||||
@@ -57,18 +39,10 @@ local on_attach = function(client, bufnr)
|
|||||||
map("n", "<leader>q", vim.diagnostic.setloclist, opts "Set loclist")
|
map("n", "<leader>q", vim.diagnostic.setloclist, opts "Set loclist")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Disable semantic tokens (performance optimization)
|
|
||||||
local on_init = function(client, _)
|
|
||||||
if client.supports_method "textDocument/semanticTokens" then
|
|
||||||
client.server_capabilities.semanticTokensProvider = nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local servers = {
|
local servers = {
|
||||||
rust_analyzer = {
|
rust_analyzer = {
|
||||||
filetypes = { "rust" },
|
filetypes = { "rust" },
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
on_init = on_init,
|
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
settings = {
|
settings = {
|
||||||
["rust-analyzer"] = {
|
["rust-analyzer"] = {
|
||||||
@@ -88,31 +62,26 @@ local servers = {
|
|||||||
csharp_ls = {
|
csharp_ls = {
|
||||||
filetypes = { "cs" },
|
filetypes = { "cs" },
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
on_init = on_init,
|
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
},
|
},
|
||||||
clangd = {
|
clangd = {
|
||||||
filetypes = { "c", "cpp", "objc", "objcpp" },
|
filetypes = { "c", "cpp", "objc", "objcpp" },
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
on_init = on_init,
|
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
},
|
},
|
||||||
glsl_analyzer = {
|
glsl_analyzer = {
|
||||||
filetypes = { "glsl" },
|
filetypes = { "glsl" },
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
on_init = on_init,
|
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
},
|
},
|
||||||
wgsl_analyzer = {
|
wgsl_analyzer = {
|
||||||
filetypes = { "wgsl", "wesl" },
|
filetypes = { "wgsl", "wesl" },
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
on_init = on_init,
|
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
},
|
},
|
||||||
pylsp = {
|
pylsp = {
|
||||||
filetypes = { "python" },
|
filetypes = { "python" },
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
on_init = on_init,
|
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
},
|
},
|
||||||
ron_lsp = {
|
ron_lsp = {
|
||||||
@@ -120,10 +89,9 @@ local servers = {
|
|||||||
filetypes = { "ron" },
|
filetypes = { "ron" },
|
||||||
root_dir = function(fname)
|
root_dir = function(fname)
|
||||||
local util = require("lspconfig.util")
|
local util = require("lspconfig.util")
|
||||||
return util.root_pattern("Cargo.toml", ".git")(fname) or vim.loop.cwd()
|
return util.root_pattern("Cargo.toml", ".git")(fname) or vim.uv.cwd()
|
||||||
end,
|
end,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
on_init = on_init,
|
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,10 +36,6 @@ end, { desc = "Format file" })
|
|||||||
map("n", "<leader>/", "gcc", { desc = "Toggle comment", remap = true })
|
map("n", "<leader>/", "gcc", { desc = "Toggle comment", remap = true })
|
||||||
map("v", "<leader>/", "gc", { desc = "Toggle comment", remap = true })
|
map("v", "<leader>/", "gc", { desc = "Toggle comment", remap = true })
|
||||||
|
|
||||||
-- === LSP Mappings ===
|
|
||||||
|
|
||||||
map("n", "<leader>ds", vim.diagnostic.setloclist, { desc = "LSP diagnostic loclist" })
|
|
||||||
|
|
||||||
-- === Barbar buffer navigation ===
|
-- === Barbar buffer navigation ===
|
||||||
|
|
||||||
map("n", "<Tab>", "<cmd>BufferNext<cr>", { desc = "Next buffer" })
|
map("n", "<Tab>", "<cmd>BufferNext<cr>", { desc = "Next buffer" })
|
||||||
@@ -96,7 +92,7 @@ map('n', '<leader>fd', function() fzf.diagnostics_document({ severity_limit = vi
|
|||||||
map('n', '<leader>fD', function() fzf.diagnostics_workspace({ severity_limit = vim.diagnostic.severity.ERROR }) end, { desc = "Workspace diagnostics" })
|
map('n', '<leader>fD', function() fzf.diagnostics_workspace({ severity_limit = vim.diagnostic.severity.ERROR }) end, { desc = "Workspace diagnostics" })
|
||||||
map('n', '<leader>fr', function() fzf.lsp_references() end, { desc = 'References' })
|
map('n', '<leader>fr', function() fzf.lsp_references() end, { desc = 'References' })
|
||||||
map('n', '<leader>fW', function() vim.diagnostic.open_float() end, { desc = "Open diagnostics window" })
|
map('n', '<leader>fW', function() vim.diagnostic.open_float() end, { desc = "Open diagnostics window" })
|
||||||
map("n", "<leader>ca", function() vim.lsp.buf.code_action() end, { desc = 'Code action'})
|
-- <leader>ca is mapped per-buffer in configs/lspconfig.lua on_attach
|
||||||
|
|
||||||
-- === Themery ===
|
-- === Themery ===
|
||||||
|
|
||||||
|
|||||||
@@ -86,3 +86,6 @@ vim.env.PATH = table.concat({ vim.fn.stdpath "data", "mason", "bin" }, sep) .. d
|
|||||||
|
|
||||||
-- User overrides
|
-- User overrides
|
||||||
o.scrolloff = 10 -- Keep 10 lines visible above/below cursor
|
o.scrolloff = 10 -- Keep 10 lines visible above/below cursor
|
||||||
|
|
||||||
|
-- Experimental: improved command-line and message UI
|
||||||
|
pcall(function() require('vim._core.ui2').enable() end)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
-- LSP, completion, treesitter, and code formatting
|
-- LSP, completion, and code formatting
|
||||||
return {
|
return {
|
||||||
-- LSP server manager
|
-- LSP server manager
|
||||||
{
|
{
|
||||||
@@ -32,25 +32,13 @@ return {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Syntax highlighting
|
-- Treesitter parser manager
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
event = { "BufReadPost", "BufNewFile" },
|
|
||||||
cmd = { "TSInstall", "TSBufEnable", "TSBufDisable", "TSModuleInfo" },
|
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
opts = {
|
cmd = { "TSInstall", "TSUpdate" },
|
||||||
ensure_installed = {
|
config = function()
|
||||||
"lua", "vim", "vimdoc",
|
require("nvim-treesitter").setup()
|
||||||
"rust", "c", "cpp", "glsl", "wgsl", "python",
|
|
||||||
},
|
|
||||||
highlight = {
|
|
||||||
enable = true,
|
|
||||||
use_languagetree = true,
|
|
||||||
},
|
|
||||||
indent = { enable = false },
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
require("nvim-treesitter.configs").setup(opts)
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -85,6 +73,7 @@ return {
|
|||||||
list = { selection = { auto_insert = false } },
|
list = { selection = { auto_insert = false } },
|
||||||
},
|
},
|
||||||
sources = {
|
sources = {
|
||||||
|
default = { 'lsp', 'path', 'buffer' },
|
||||||
transform_items = function(_, items)
|
transform_items = function(_, items)
|
||||||
return vim.tbl_filter(function(item)
|
return vim.tbl_filter(function(item)
|
||||||
return item.kind ~= require('blink.cmp.types').CompletionItemKind.Snippet
|
return item.kind ~= require('blink.cmp.types').CompletionItemKind.Snippet
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
select = {
|
select = {
|
||||||
enabled = false,
|
enabled = true,
|
||||||
},
|
},
|
||||||
indent = {
|
indent = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
|
|||||||
Reference in New Issue
Block a user