- VIM options updated for: autowrite, formatoptions, conceallevel,
  sidescrolloff, updatetime, wildmode
- LSP_config: options to display diagnostic icons, inlay hints
- Lint: codespell on "*" removed it wasn't working
- Formatting: ignore errors
- LuaSnip: Tab fix reversed, interfered with regular operations
- NVIM: Options for splitkeep & markdown_recommended_style
This commit is contained in:
Pratik Tripathy
2024-03-11 17:20:26 +05:30
parent b0c0dd0543
commit 12178dd96c
6 changed files with 42 additions and 19 deletions

View File

@@ -74,16 +74,15 @@ return {
{
"L3MON4D3/LuaSnip",
keys = {
-- TODO: Verify if this fixed the tab-going-crazy-sometimes issue
-- {
-- "<tab>",
-- function()
-- return require("luasnip").jumpable(1) and "<Plug>luasnip-jump-next" or "<tab>"
-- end,
-- expr = true,
-- silent = true,
-- mode = "i",
-- },
{
"<tab>",
function()
return require("luasnip").jumpable(1) and "<Plug>luasnip-jump-next" or "<tab>"
end,
expr = true,
silent = true,
mode = "i",
},
{
"<tab>",
function()

View File

@@ -29,9 +29,11 @@ return {
format_on_save = {
lsp_fallback = true,
async = false,
timeout_ms = 1000,
timeout_ms = 3000,
quiet = false,
},
formatters = {
injected = { options = { ignore_errors = true } },
shfmt = {
prepend_args = { "-i", "4" },
},

View File

@@ -20,7 +20,6 @@ return {
typescriptreact = { "codespell" },
javascriptreact = { "codespell" },
html = { "codespell" },
["*"] = { "codespell" },
}
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })

View File

@@ -36,14 +36,11 @@ return {
-- Automatically install LSPs to stdpath for neovim
{ "williamboman/mason.nvim", config = true },
{ "williamboman/mason-lspconfig.nvim" },
{ "folke/neodev.nvim" },
-- Useful status updates for LSP
{ "j-hui/fidget.nvim", opts = {} },
{ "folke/neodev.nvim" },
},
-- WARN: DO NOT do `config` here it would override `config` from coding-formatting.lua
-- That's why we do the LSP config inside mason-lspconfig
},
{
@@ -68,7 +65,7 @@ return {
Lua = {
workspace = { checkThirdParty = false },
telemetry = { enable = false },
-- hint = { enable = true },
completion = { callSnippet = "Replace" },
-- NOTE: toggle below to ignore Lua_LS's noisy `missing-fields` warnings
-- diagnostics = { disable = { 'missing-fields' } },
},
@@ -127,10 +124,29 @@ return {
mason_lspconfig.setup_handlers({
function(server_name)
require("lspconfig")[server_name].setup({
inlay_hints = { enabled = true },
capabilities = capabilities,
on_attach = on_attach,
settings = servers[server_name],
filetypes = (servers[server_name] or {}).filetypes,
diagnostics = {
underline = true,
update_in_insert = false,
virtual_text = {
spacing = 4,
source = "if_many",
prefix = "",
},
severity_sort = true,
signs = {
text = {
[vim.diagnostic.severity.ERROR] = require("config.util").icons.diagnostics.Error,
[vim.diagnostic.severity.WARN] = require("config.util").icons.diagnostics.Warn,
[vim.diagnostic.severity.HINT] = require("config.util").icons.diagnostics.Hint,
[vim.diagnostic.severity.INFO] = require("config.util").icons.diagnostics.Info,
},
},
},
})
end,
})