astro-nvim-v3 - turn on diagnose for checking errors

This commit is contained in:
huyjaky
2025-02-16 10:57:17 +07:00
parent 93678288f1
commit dcdb4c4397
4 changed files with 6 additions and 3 deletions

View File

@@ -13,7 +13,7 @@ return {
large_buf = { size = 1024 * 500, lines = 10000 }, -- set global limits for large files for disabling features like treesitter
autopairs = false, -- enable autopairs at start
cmp = true, -- enable completion at start
diagnostics_mode = 0, -- diagnostic mode on start (0 = off, 1 = no signs/virtual text, 2 = no virtual text, 3 = on)
diagnostics_mode = 3, -- diagnostic mode on start (0 = off, 1 = no signs/virtual text, 2 = no virtual text, 3 = on)
highlighturl = false, -- highlight URLs at start
notifications = true, -- enable notifications at start
},

View File

@@ -86,6 +86,8 @@ return {
"I001",
"RET504",
"PLR2004",
"W291",
"PLW2901"
},
},

View File

@@ -8,7 +8,7 @@ return {
-- or just leave it empty :)
enabled = true, -- start auto-save when the plugin is loaded (i.e. when your package manager loads it)
trigger_events = { -- See :h events
-- immediate_save = { "BufLeave", "FocusLost" }, -- vim events that trigger an immediate save
immediate_save = { "BufLeave", "FocusLost" }, -- vim events that trigger an immediate save
defer_save = {"TextChanged" }, -- vim events that trigger a deferred save (saves after `debounce_delay`)
cancel_deferred_save = { "InsertEnter" }, -- vim events that cancel a pending deferred save
},

View File

@@ -118,10 +118,11 @@ return {
end
end, { "i", "s" }),
vim.api.nvim_set_keymap("i", "<C-f>", 'copilot#Accept("\\<CR>")', { expr = true, silent = true }),
-- vim.g.copilot_no_tab_map = true,
-- ["<C-f>"] = cmp.mapping(function(fallback)
-- -- Check if Copilot is suggesting something
-- if vim.fn["copilot#Accept"]() ~= "" then
-- vim.api.nvim_set_keymap("i", "<C-f>", 'copilot#Accept("\\<CR>")', { expr = true, silent = true })
-- else
-- fallback() -- If no suggestion, fallback to default behavior
-- end