mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-14 22:53:21 +00:00
chore(nvim): mason tools, sessionopts
This commit is contained in:
@@ -39,7 +39,7 @@ o.termguicolors = true -- Enable GUI colors
|
|||||||
o.timeoutlen = 250 -- Decrease mapped sequence wait time
|
o.timeoutlen = 250 -- Decrease mapped sequence wait time
|
||||||
o.updatetime = 250 -- 250 ms = 2,5 seconds
|
o.updatetime = 250 -- 250 ms = 2,5 seconds
|
||||||
o.sessionoptions =
|
o.sessionoptions =
|
||||||
'blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions'
|
'buffers,curdir,folds,tabpages,winsize,winpos,terminal,localoptions'
|
||||||
|
|
||||||
-- Enable the colorcolumn
|
-- Enable the colorcolumn
|
||||||
vim.api.nvim_set_option_value('colorcolumn', '+1', { scope = 'global' })
|
vim.api.nvim_set_option_value('colorcolumn', '+1', { scope = 'global' })
|
||||||
|
|||||||
@@ -196,12 +196,16 @@ return {
|
|||||||
'goimports',
|
'goimports',
|
||||||
'gotests',
|
'gotests',
|
||||||
'phpcbf',
|
'phpcbf',
|
||||||
|
'phpmd',
|
||||||
|
'phpstan',
|
||||||
'pint',
|
'pint',
|
||||||
'prettierd',
|
'prettierd',
|
||||||
|
'semgrep',
|
||||||
'shellcheck',
|
'shellcheck',
|
||||||
'shfmt',
|
'shfmt',
|
||||||
'staticcheck',
|
'staticcheck',
|
||||||
'stylua',
|
'stylua',
|
||||||
|
'trivy',
|
||||||
'vint',
|
'vint',
|
||||||
'yamlfmt',
|
'yamlfmt',
|
||||||
},
|
},
|
||||||
@@ -284,6 +288,8 @@ return {
|
|||||||
validate = { enable = true },
|
validate = { enable = true },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- end of junnplus/lsp-setup config
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -317,6 +323,11 @@ return {
|
|||||||
else
|
else
|
||||||
lsp_format_opt = 'fallback'
|
lsp_format_opt = 'fallback'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Disable autoformat for files in a certain path
|
||||||
|
local bufname = vim.api.nvim_buf_get_name(bufnr)
|
||||||
|
if bufname:match '/node_modules/' then return end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
timeout_ms = 500,
|
timeout_ms = 500,
|
||||||
lsp_format = lsp_format_opt,
|
lsp_format = lsp_format_opt,
|
||||||
@@ -326,6 +337,7 @@ return {
|
|||||||
lua = { 'stylua' },
|
lua = { 'stylua' },
|
||||||
sh = { 'shfmt' },
|
sh = { 'shfmt' },
|
||||||
bash = { 'shfmt' },
|
bash = { 'shfmt' },
|
||||||
|
php = { 'phpcbf' },
|
||||||
-- Conform can also run multiple formatters sequentially
|
-- Conform can also run multiple formatters sequentially
|
||||||
-- python = { "isort", "black" },
|
-- python = { "isort", "black" },
|
||||||
--
|
--
|
||||||
@@ -333,6 +345,10 @@ return {
|
|||||||
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
init = function()
|
||||||
|
-- If you want the formatexpr, here is the place to set it
|
||||||
|
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
-- Automatically install formatters registered with conform.nvim via mason.nvim
|
-- Automatically install formatters registered with conform.nvim via mason.nvim
|
||||||
-- https://github.com/zapling/mason-conform.nvim
|
-- https://github.com/zapling/mason-conform.nvim
|
||||||
|
|||||||
Reference in New Issue
Block a user