refactor(nvim): simplify lazy loading configuration
This commit is contained in:
1 parent
eb30446aeb
commit
be6d52c586
9 files changed
+64
-66
No files matched your search
+4
-2
@@ -15,6 +15,7 @@
|
|||||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||||
"chezmoi.nvim": { "branch": "main", "commit": "8b426285c2b0acb9b0dd46789193fa97f6480b99" },
|
"chezmoi.nvim": { "branch": "main", "commit": "8b426285c2b0acb9b0dd46789193fa97f6480b99" },
|
||||||
"chezmoi.vim": { "branch": "main", "commit": "ca5f2ed602046d5662cb76d845c4b510aae0ce84" },
|
"chezmoi.vim": { "branch": "main", "commit": "ca5f2ed602046d5662cb76d845c4b510aae0ce84" },
|
||||||
|
"claudecode.nvim": { "branch": "main", "commit": "1552086ebcce9f4a2ea3b9793018a884d6b60169" },
|
||||||
"cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" },
|
"cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "fbcb4fa7f34bfea9be702ffff481a8e336ebf6ed" },
|
"conform.nvim": { "branch": "master", "commit": "fbcb4fa7f34bfea9be702ffff481a8e336ebf6ed" },
|
||||||
"crates.nvim": { "branch": "main", "commit": "ac9fa498a9edb96dc3056724ff69d5f40b898453" },
|
"crates.nvim": { "branch": "main", "commit": "ac9fa498a9edb96dc3056724ff69d5f40b898453" },
|
||||||
@@ -33,11 +34,11 @@
|
|||||||
"lazydev.nvim": { "branch": "main", "commit": "e28ce52fc7ff79fcb76f0e79ee6fb6182fca90b9" },
|
"lazydev.nvim": { "branch": "main", "commit": "e28ce52fc7ff79fcb76f0e79ee6fb6182fca90b9" },
|
||||||
"lsp_lines.nvim": { "branch": "main", "commit": "a92c755f182b89ea91bd8a6a2227208026f27b4d" },
|
"lsp_lines.nvim": { "branch": "main", "commit": "a92c755f182b89ea91bd8a6a2227208026f27b4d" },
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
|
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "2304ff65ecc8cb2afc2484de3e2ed9a407edf0b9" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
|
||||||
"mason-null-ls.nvim": { "branch": "main", "commit": "2b8433f76598397fcc97318d410e0c4f7a4bea6a" },
|
"mason-null-ls.nvim": { "branch": "main", "commit": "2b8433f76598397fcc97318d410e0c4f7a4bea6a" },
|
||||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "4c2cdc69d69fe00c15ae8648f7e954d99e5de3ea" },
|
"mason-nvim-dap.nvim": { "branch": "main", "commit": "4c2cdc69d69fe00c15ae8648f7e954d99e5de3ea" },
|
||||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
|
"mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
|
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
||||||
"mini.bufremove": { "branch": "main", "commit": "285bdac9596ee7375db50c0f76ed04336dcd2685" },
|
"mini.bufremove": { "branch": "main", "commit": "285bdac9596ee7375db50c0f76ed04336dcd2685" },
|
||||||
"neo-tree.nvim": { "branch": "main", "commit": "20244beec28b9d79ffb75fe1b1606f4dd8d476fc" },
|
"neo-tree.nvim": { "branch": "main", "commit": "20244beec28b9d79ffb75fe1b1606f4dd8d476fc" },
|
||||||
"neoconf.nvim": { "branch": "main", "commit": "f630568a4d04154803886f21ca60923f12709f0f" },
|
"neoconf.nvim": { "branch": "main", "commit": "f630568a4d04154803886f21ca60923f12709f0f" },
|
||||||
@@ -73,6 +74,7 @@
|
|||||||
"resession.nvim": { "branch": "master", "commit": "cc819b0489938d03e4f3532a583354f0287c015b" },
|
"resession.nvim": { "branch": "master", "commit": "cc819b0489938d03e4f3532a583354f0287c015b" },
|
||||||
"schemastore.nvim": { "branch": "main", "commit": "e71cc0607284739892287f6a2d92753999179dcf" },
|
"schemastore.nvim": { "branch": "main", "commit": "e71cc0607284739892287f6a2d92753999179dcf" },
|
||||||
"smart-splits.nvim": { "branch": "master", "commit": "ddb23c1a1cf1507bda487cda7f6e4690965ef9f5" },
|
"smart-splits.nvim": { "branch": "master", "commit": "ddb23c1a1cf1507bda487cda7f6e4690965ef9f5" },
|
||||||
|
"snacks.nvim": { "branch": "main", "commit": "bebf0bd38e3e7071abc4085ad46f1ebc32cdfe17" },
|
||||||
"supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" },
|
"supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" },
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "a17d611a0e111836a1db5295f04945df407c5135" },
|
"telescope.nvim": { "branch": "master", "commit": "a17d611a0e111836a1db5295f04945df407c5135" },
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ return {
|
|||||||
version = false, -- Use latest astrocommunity
|
version = false, -- Use latest astrocommunity
|
||||||
{ import = "astrocommunity.pack.astro" },
|
{ import = "astrocommunity.pack.astro" },
|
||||||
{ import = "astrocommunity.pack.bash" },
|
{ import = "astrocommunity.pack.bash" },
|
||||||
{ import = "astrocommunity.pack.biome" },
|
|
||||||
{ import = "astrocommunity.pack.chezmoi" },
|
{ import = "astrocommunity.pack.chezmoi" },
|
||||||
{ import = "astrocommunity.pack.lua" },
|
{ import = "astrocommunity.pack.lua" },
|
||||||
{ import = "astrocommunity.pack.markdown" },
|
{ import = "astrocommunity.pack.markdown" },
|
||||||
@@ -18,7 +17,6 @@ return {
|
|||||||
{ import = "astrocommunity.pack.golangci-lint" },
|
{ import = "astrocommunity.pack.golangci-lint" },
|
||||||
{ import = "astrocommunity.pack.html-css" },
|
{ import = "astrocommunity.pack.html-css" },
|
||||||
{ import = "astrocommunity.pack.oxlint" },
|
{ import = "astrocommunity.pack.oxlint" },
|
||||||
{ import = "astrocommunity.pack.prettier" },
|
|
||||||
{ import = "astrocommunity.pack.toml" },
|
{ import = "astrocommunity.pack.toml" },
|
||||||
{ import = "astrocommunity.pack.templ" },
|
{ import = "astrocommunity.pack.templ" },
|
||||||
{ import = "astrocommunity.pack.tailwindcss" },
|
{ import = "astrocommunity.pack.tailwindcss" },
|
||||||
@@ -26,7 +24,6 @@ return {
|
|||||||
{ import = "astrocommunity.pack.yaml" },
|
{ import = "astrocommunity.pack.yaml" },
|
||||||
{ import = "astrocommunity.utility.noice-nvim" },
|
{ import = "astrocommunity.utility.noice-nvim" },
|
||||||
{ import = "astrocommunity.git.octo-nvim" },
|
{ import = "astrocommunity.git.octo-nvim" },
|
||||||
{ import = "astrocommunity.programming-langauge-support.kuala-nvim" },
|
|
||||||
{ import = "astrocommunity.bars-and-lines.bufferline-nvim" },
|
{ import = "astrocommunity.bars-and-lines.bufferline-nvim" },
|
||||||
{ import = "astrocommunity.code-runner.overseer-nvim" },
|
{ import = "astrocommunity.code-runner.overseer-nvim" },
|
||||||
{ import = "astrocommunity.completion.supermaven-nvim" },
|
{ import = "astrocommunity.completion.supermaven-nvim" },
|
||||||
|
|||||||
@@ -20,18 +20,6 @@ function M.setup()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local Terminal = require("toggleterm.terminal").Terminal
|
local Terminal = require("toggleterm.terminal").Terminal
|
||||||
|
|
||||||
-- Claude terminal configuration
|
|
||||||
local claude = Terminal:new {
|
|
||||||
cmd = "claude --dangerously-skip-permissions",
|
|
||||||
hidden = true,
|
|
||||||
direction = "vertical",
|
|
||||||
close_on_exit = true,
|
|
||||||
on_open = function(term)
|
|
||||||
vim.cmd "startinsert!"
|
|
||||||
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", { noremap = true, silent = true })
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
-- Scooter find and replace terminal
|
-- Scooter find and replace terminal
|
||||||
local smartCommit = Terminal:new {
|
local smartCommit = Terminal:new {
|
||||||
cmd = "smartcommit",
|
cmd = "smartcommit",
|
||||||
@@ -79,7 +67,6 @@ function M.setup()
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Export toggle functions to module instead of global namespace
|
-- Export toggle functions to module instead of global namespace
|
||||||
M.claude_toggle = function() claude:toggle() end
|
|
||||||
M.scooter_toggle = function() scooter:toggle() end
|
M.scooter_toggle = function() scooter:toggle() end
|
||||||
M.mk_toggle = function() mk:toggle() end
|
M.mk_toggle = function() mk:toggle() end
|
||||||
M.lazygit_toggle = function() lazygit:toggle() end
|
M.lazygit_toggle = function() lazygit:toggle() end
|
||||||
|
|||||||
@@ -403,7 +403,6 @@ return {
|
|||||||
desc = "Find Service files",
|
desc = "Find Service files",
|
||||||
},
|
},
|
||||||
-- AI/Assistant mappings
|
-- AI/Assistant mappings
|
||||||
["<C-a><C-a>"] = { terminals.claude_toggle, desc = "Claude Toggle" },
|
|
||||||
["<C-t><C-t>"] = { terminals.mk_toggle, desc = "Taskfile Toggle" },
|
["<C-t><C-t>"] = { terminals.mk_toggle, desc = "Taskfile Toggle" },
|
||||||
},
|
},
|
||||||
i = {
|
i = {
|
||||||
|
|||||||
@@ -43,11 +43,10 @@ return {
|
|||||||
"lua",
|
"lua",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- Disable LSP formatting for these (use conform.nvim/biome instead)
|
-- Disable LSP formatting for these (use conform.nvim/oxfmt instead)
|
||||||
disabled = {
|
disabled = {
|
||||||
"tsserver", -- Use biome/prettier via conform
|
"tsserver", -- Use oxfmt via conform
|
||||||
"vtsls", -- Use biome/prettier via conform
|
"vtsls", -- Use oxfmt via conform
|
||||||
"eslint", -- Diagnostics only, not formatting
|
|
||||||
"html", -- Use conform
|
"html", -- Use conform
|
||||||
"cssls", -- Use conform
|
"cssls", -- Use conform
|
||||||
"tailwindcss", -- Doesn't format
|
"tailwindcss", -- Doesn't format
|
||||||
@@ -177,19 +176,6 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- ESLint configuration
|
|
||||||
eslint = {
|
|
||||||
settings = {
|
|
||||||
workingDirectories = { mode = "auto" },
|
|
||||||
format = false, -- Don't use ESLint for formatting
|
|
||||||
},
|
|
||||||
on_attach = function(client, bufnr)
|
|
||||||
-- Disable formatting capability (use conform.nvim)
|
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
|
||||||
client.server_capabilities.documentRangeFormattingProvider = false
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Tailwind for React components
|
-- Tailwind for React components
|
||||||
tailwindcss = {
|
tailwindcss = {
|
||||||
settings = {
|
settings = {
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
return {
|
||||||
|
"coder/claudecode.nvim",
|
||||||
|
dependencies = { "folke/snacks.nvim" },
|
||||||
|
config = true,
|
||||||
|
keys = {
|
||||||
|
{ "<C-a>", nil, desc = "AI/Claude Code" },
|
||||||
|
{ "<C-a><C-a>", "<cmd>ClaudeCode<cr>", desc = "Toggle Claude" },
|
||||||
|
{ "<C-a>f", "<cmd>ClaudeCodeFocus<cr>", desc = "Focus Claude" },
|
||||||
|
{ "<C-a>C", "<cmd>ClaudeCode --resume<cr>", desc = "Resume Claude" },
|
||||||
|
{ "<C-a>c", "<cmd>ClaudeCode --continue<cr>", desc = "Continue Claude" },
|
||||||
|
{ "<C-a>m", "<cmd>ClaudeCodeSelectModel<cr>", desc = "Select Claude model" },
|
||||||
|
{ "<C-a>b", "<cmd>ClaudeCodeAdd %<cr>", desc = "Add current buffer" },
|
||||||
|
{ "<C-a>", "<cmd>ClaudeCodeSend<cr>", mode = "v", desc = "Send to Claude" },
|
||||||
|
{
|
||||||
|
"<C-a>",
|
||||||
|
"<cmd>ClaudeCodeTreeAdd<cr>",
|
||||||
|
desc = "Add file",
|
||||||
|
ft = { "NvimTree", "neo-tree", "oil", "minifiles", "netrw" },
|
||||||
|
},
|
||||||
|
-- Diff management
|
||||||
|
{ "<C-a>y", "<cmd>ClaudeCodeDiffAccept<cr>", desc = "Accept diff" },
|
||||||
|
{ "<C-a>n", "<cmd>ClaudeCodeDiffDeny<cr>", desc = "Deny diff" },
|
||||||
|
},
|
||||||
|
}
|
||||||
+14
-20
@@ -1,5 +1,5 @@
|
|||||||
--- Linting and formatting configuration
|
--- Linting and formatting configuration
|
||||||
--- Includes oxlint, prettier, and ESLint integration
|
--- Includes oxlint and oxfmt integration
|
||||||
--- @module plugins.linting
|
--- @module plugins.linting
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -10,17 +10,17 @@ return {
|
|||||||
cmd = { "ConformInfo" },
|
cmd = { "ConformInfo" },
|
||||||
opts = {
|
opts = {
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
typescript = { "prettier" },
|
typescript = { "oxfmt" },
|
||||||
typescriptreact = { "prettier" },
|
typescriptreact = { "oxfmt" },
|
||||||
javascript = { "prettier" },
|
javascript = { "oxfmt" },
|
||||||
javascriptreact = { "prettier" },
|
javascriptreact = { "oxfmt" },
|
||||||
json = { "prettier" },
|
json = { "oxfmt" },
|
||||||
jsonc = { "prettier" },
|
jsonc = { "oxfmt" },
|
||||||
css = { "prettier" },
|
css = { "oxfmt" },
|
||||||
scss = { "prettier" },
|
scss = { "oxfmt" },
|
||||||
html = { "prettier" },
|
html = { "oxfmt" },
|
||||||
markdown = { "prettier" },
|
markdown = { "oxfmt" },
|
||||||
yaml = { "prettier" },
|
yaml = { "oxfmt" },
|
||||||
lua = { "stylua" },
|
lua = { "stylua" },
|
||||||
rust = { "rustfmt" },
|
rust = { "rustfmt" },
|
||||||
toml = { "taplo" },
|
toml = { "taplo" },
|
||||||
@@ -34,11 +34,7 @@ return {
|
|||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
formatters = {
|
formatters = {
|
||||||
prettier = {
|
-- oxfmt uses default configuration
|
||||||
prepend_args = {
|
|
||||||
"--plugin=prettier-plugin-tailwindcss",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
@@ -136,15 +132,13 @@ return {
|
|||||||
opts = {
|
opts = {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
-- Formatters
|
-- Formatters
|
||||||
"prettier",
|
|
||||||
"stylua",
|
"stylua",
|
||||||
"rustfmt",
|
"rustfmt",
|
||||||
"taplo",
|
"taplo",
|
||||||
-- Linters
|
-- Linters
|
||||||
"eslint_d",
|
|
||||||
"stylelint",
|
"stylelint",
|
||||||
"markdownlint",
|
"markdownlint",
|
||||||
-- Note: oxlint should be installed via cargo/npm separately
|
-- Note: oxlint and oxfmt should be installed via cargo/npm separately
|
||||||
},
|
},
|
||||||
auto_update = false,
|
auto_update = false,
|
||||||
run_on_start = true,
|
run_on_start = true,
|
||||||
|
|||||||
@@ -167,6 +167,25 @@ return {
|
|||||||
-- These Find keybindings are defined in astrocore.lua
|
-- These Find keybindings are defined in astrocore.lua
|
||||||
-- NeoTree only needs the basic navigation and terminal bindings
|
-- NeoTree only needs the basic navigation and terminal bindings
|
||||||
-- Mappings for Mason and formatting
|
-- Mappings for Mason and formatting
|
||||||
|
["N"] = function(state)
|
||||||
|
local node = state.tree:get_node()
|
||||||
|
local path = node.type == "directory" and node.path or vim.fn.fnamemodify(node.path, ":h")
|
||||||
|
|
||||||
|
-- Check if running on Arch Linux
|
||||||
|
local is_arch = vim.fn.filereadable("/etc/arch-release") == 1
|
||||||
|
|
||||||
|
if is_arch then
|
||||||
|
-- Use uwsm to launch alacritty with yazi on Arch Linux
|
||||||
|
vim.fn.jobstart(string.format("uwsm app -- alacritty --working-directory %s -e yazi", vim.fn.shellescape(path)), {
|
||||||
|
detach = true,
|
||||||
|
})
|
||||||
|
else
|
||||||
|
-- Fallback to direct alacritty launch with yazi on other systems
|
||||||
|
vim.fn.jobstart(string.format("alacritty --working-directory %s -e yazi", vim.fn.shellescape(path)), {
|
||||||
|
detach = true,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
header = {
|
header = {
|
||||||
highlight = "NeoTreeHeader",
|
highlight = "NeoTreeHeader",
|
||||||
|
|||||||
@@ -74,15 +74,6 @@ return {
|
|||||||
html = {
|
html = {
|
||||||
filetypes = { "html", "typescriptreact", "javascriptreact" },
|
filetypes = { "html", "typescriptreact", "javascriptreact" },
|
||||||
},
|
},
|
||||||
-- ESLint LSP
|
|
||||||
eslint = {
|
|
||||||
settings = {
|
|
||||||
workingDirectories = { mode = "auto" },
|
|
||||||
experimental = {
|
|
||||||
useFlatConfig = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -196,7 +187,6 @@ return {
|
|||||||
"tailwindcss",
|
"tailwindcss",
|
||||||
"cssls",
|
"cssls",
|
||||||
"html",
|
"html",
|
||||||
"eslint",
|
|
||||||
"jsonls",
|
"jsonls",
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|||||||
Reference in new issue
Block a user