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" }, lua = { "stylua" },
markdown = { "mdformat" }, markdown = { "mdformat" },
python = { "isort", "yapf" }, python = { "isort", "yapf" },
sh = { "beautysh" }, sh = { "shfmt" },
shell = { "beautysh" }, bash = { "shfmt" },
zsh = { "shfmt" },
tex = { "latexindent" }, tex = { "latexindent" },
yaml = { "yamlfmt" }, 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, end,
}, },
} }

View File

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

View File

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