1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2026-02-14 17:14:47 +01:00

nvim: updated formatters

This commit is contained in:
2026-01-31 09:14:04 +01:00
parent 8c6178418b
commit 4e8a537c32
3 changed files with 43 additions and 36 deletions

View File

@@ -8,24 +8,13 @@ return {
lua = { "stylua" },
markdown = { "mdformat" },
python = { "isort", "yapf" },
sh = { "beautysh" },
shell = { "beautysh" },
sh = { "shfmt" },
bash = { "shfmt" },
zsh = { "shfmt" },
tex = { "latexindent" },
yaml = { "yamlfmt" },
},
})
require("conform").formatters.latexindent = {
args = require("conform.util").extend_args(
require("conform.formatters.latexindent").args,
{ "-y=defaultIndent: ' '" }
),
}
require("conform").formatters.beautysh = {
args = require("conform.util").extend_args(
require("conform.formatters.beautysh").args,
{ "--indent-size=2", "--force-function-style=fnpar" }
),
}
end,
},
}

View File

@@ -1,15 +1,15 @@
return {
-- lang server installations
{
'williamboman/mason.nvim',
"williamboman/mason.nvim",
dependencies = {
{
'nvimtools/none-ls.nvim',
"nvimtools/none-ls.nvim",
config = function()
require("null-ls").setup({
sources = {
-- latex
-- require("null-ls").builtins.formatting.latexindent,
-- assembler
require("null-ls").builtins.formatting.asmfmt,
-- lua
require("null-ls").builtins.formatting.stylua,
-- markdown
@@ -18,20 +18,20 @@ return {
require("null-ls").builtins.formatting.isort,
require("null-ls").builtins.formatting.yapf,
-- shell
-- require("null-ls").builtins.formatting.beautysh,
require("null-ls").builtins.formatting.shfmt,
-- yaml
require("null-ls").builtins.formatting.yamlfmt,
}
},
})
end
end,
},
{
'jay-babu/mason-null-ls.nvim',
"jay-babu/mason-null-ls.nvim",
opts = {
automatic_installation = true,
ensure_installed = {
-- latex
"latexindent",
-- assembler
"asmfmt",
-- lua
"stylua",
-- markdown
@@ -40,13 +40,13 @@ return {
"isort",
"yapf",
-- shell
"beautysh",
"shfmt",
-- yaml
"yamlfmt",
}
}
},
},
},
},
opts = { ui = { icons = Install_signs } }
}
opts = { ui = { icons = Install_signs } },
},
}

View File

@@ -24,22 +24,40 @@ return {
require("mason-lspconfig").setup({
automatic_setup = true,
ensure_installed = {
"bashls",
-- assembler
"asm_lsp",
-- c
"clangd",
-- docker
"dockerls",
-- go
"gopls",
-- html
"html",
-- json
"jsonls",
-- xml
"lemminx",
-- latex
"ltex",
"lua_ls",
"marksman",
"nimls",
"pyright",
"r_language_server",
"sqlls",
"texlab",
-- lua
"lua_ls",
-- markdown
"marksman",
-- nim
"nimls",
-- python
"pyright",
-- r
"r_language_server",
-- shell
"bashls",
-- sql
"sqlls",
-- typescript / javascript
"ts_ls",
-- yaml
"yamlls",
},
})