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
@@ -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 = {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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
|
||||
--- 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,
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user