refactor(nvim): simplify lazy loading configuration

This commit is contained in:
Prad Nukala committed 2025-10-20 20:38:17 -04:00
1 parent eb30446aeb
commit be6d52c586
9 files changed
+64 -66

No files matched your search

-3
View File
@@ -8,7 +8,6 @@ return {
version = false, -- Use latest astrocommunity
{ import = "astrocommunity.pack.astro" },
{ import = "astrocommunity.pack.bash" },
{ import = "astrocommunity.pack.biome" },
{ import = "astrocommunity.pack.chezmoi" },
{ import = "astrocommunity.pack.lua" },
{ import = "astrocommunity.pack.markdown" },
@@ -18,7 +17,6 @@ return {
{ import = "astrocommunity.pack.golangci-lint" },
{ import = "astrocommunity.pack.html-css" },
{ import = "astrocommunity.pack.oxlint" },
{ import = "astrocommunity.pack.prettier" },
{ import = "astrocommunity.pack.toml" },
{ import = "astrocommunity.pack.templ" },
{ import = "astrocommunity.pack.tailwindcss" },
@@ -26,7 +24,6 @@ return {
{ import = "astrocommunity.pack.yaml" },
{ import = "astrocommunity.utility.noice-nvim" },
{ import = "astrocommunity.git.octo-nvim" },
{ import = "astrocommunity.programming-langauge-support.kuala-nvim" },
{ import = "astrocommunity.bars-and-lines.bufferline-nvim" },
{ import = "astrocommunity.code-runner.overseer-nvim" },
{ import = "astrocommunity.completion.supermaven-nvim" },
-13
View File
@@ -20,18 +20,6 @@ function M.setup()
end
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
local smartCommit = Terminal:new {
cmd = "smartcommit",
@@ -79,7 +67,6 @@ function M.setup()
}
-- Export toggle functions to module instead of global namespace
M.claude_toggle = function() claude:toggle() end
M.scooter_toggle = function() scooter:toggle() end
M.mk_toggle = function() mk:toggle() end
M.lazygit_toggle = function() lazygit:toggle() end
-1
View File
@@ -403,7 +403,6 @@ return {
desc = "Find Service files",
},
-- AI/Assistant mappings
["<C-a><C-a>"] = { terminals.claude_toggle, desc = "Claude Toggle" },
["<C-t><C-t>"] = { terminals.mk_toggle, desc = "Taskfile Toggle" },
},
i = {
+3 -17
View File
@@ -43,11 +43,10 @@ return {
"lua",
},
},
-- Disable LSP formatting for these (use conform.nvim/biome instead)
-- Disable LSP formatting for these (use conform.nvim/oxfmt instead)
disabled = {
"tsserver", -- Use biome/prettier via conform
"vtsls", -- Use biome/prettier via conform
"eslint", -- Diagnostics only, not formatting
"tsserver", -- Use oxfmt via conform
"vtsls", -- Use oxfmt via conform
"html", -- Use conform
"cssls", -- Use conform
"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
tailwindcss = {
settings = {
+24
View File
@@ -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
View File
@@ -1,5 +1,5 @@
--- Linting and formatting configuration
--- Includes oxlint, prettier, and ESLint integration
--- Includes oxlint and oxfmt integration
--- @module plugins.linting
return {
@@ -10,17 +10,17 @@ return {
cmd = { "ConformInfo" },
opts = {
formatters_by_ft = {
typescript = { "prettier" },
typescriptreact = { "prettier" },
javascript = { "prettier" },
javascriptreact = { "prettier" },
json = { "prettier" },
jsonc = { "prettier" },
css = { "prettier" },
scss = { "prettier" },
html = { "prettier" },
markdown = { "prettier" },
yaml = { "prettier" },
typescript = { "oxfmt" },
typescriptreact = { "oxfmt" },
javascript = { "oxfmt" },
javascriptreact = { "oxfmt" },
json = { "oxfmt" },
jsonc = { "oxfmt" },
css = { "oxfmt" },
scss = { "oxfmt" },
html = { "oxfmt" },
markdown = { "oxfmt" },
yaml = { "oxfmt" },
lua = { "stylua" },
rust = { "rustfmt" },
toml = { "taplo" },
@@ -34,11 +34,7 @@ return {
}
end,
formatters = {
prettier = {
prepend_args = {
"--plugin=prettier-plugin-tailwindcss",
},
},
-- oxfmt uses default configuration
},
},
config = function(_, opts)
@@ -136,15 +132,13 @@ return {
opts = {
ensure_installed = {
-- Formatters
"prettier",
"stylua",
"rustfmt",
"taplo",
-- Linters
"eslint_d",
"stylelint",
"markdownlint",
-- Note: oxlint should be installed via cargo/npm separately
-- Note: oxlint and oxfmt should be installed via cargo/npm separately
},
auto_update = false,
run_on_start = true,
+19
View File
@@ -167,6 +167,25 @@ return {
-- These Find keybindings are defined in astrocore.lua
-- NeoTree only needs the basic navigation and terminal bindings
-- 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 = {
highlight = "NeoTreeHeader",
-10
View File
@@ -74,15 +74,6 @@ return {
html = {
filetypes = { "html", "typescriptreact", "javascriptreact" },
},
-- ESLint LSP
eslint = {
settings = {
workingDirectories = { mode = "auto" },
experimental = {
useFlatConfig = true,
},
},
},
},
},
},
@@ -196,7 +187,6 @@ return {
"tailwindcss",
"cssls",
"html",
"eslint",
"jsonls",
})
end,