Add nim tooling

This commit is contained in:
Alexander Navarro 2024-04-14 11:24:02 -04:00
parent 34e2058062
commit 4a98528c4d
3 changed files with 21 additions and 18 deletions

View file

@ -6,25 +6,26 @@ return {
-- Formatters can be installed by mason -- Formatters can be installed by mason
formatters_by_ft = { formatters_by_ft = {
-- Conform will run multiple formatters sequentially -- Conform will run multiple formatters sequentially
lua = { "stylua" },
blade = { "blade-formatter" },
python = { "blue" },
-- Use a sub-list to run only the first available formatter -- Use a sub-list to run only the first available formatter
json = { { "prettierd", "prettier" } },
jsonc = { { "prettierd", "prettier" } },
javascript = { { "prettierd", "prettier" } },
typescript = { { "prettierd", "prettier" } },
javascriptreact = { { "prettierd", "prettier" } },
typescriptreact = { { "prettierd", "prettier" } },
css = { { "prettierd", "prettier" } },
scss = { { "prettierd", "prettier" } },
html = { "prettierd" },
sh = { "shfmt" },
zsh = { "shfmt" },
markdown = { "markdownlint" },
-- Use the "_" filetype to run formatters on filetypes that don't -- Use the "_" filetype to run formatters on filetypes that don't
-- have other formatters configured. -- have other formatters configured.
["_"] = { "trim_whitespace" }, ["_"] = { "trim_whitespace" },
blade = { "blade-formatter" },
css = { { "prettierd", "prettier" } },
html = { "prettierd" },
javascript = { { "prettierd", "prettier" } },
javascriptreact = { { "prettierd", "prettier" } },
json = { { "prettierd", "prettier" } },
jsonc = { { "prettierd", "prettier" } },
lua = { "stylua" },
markdown = { "markdownlint" },
nim = { "nimpretty" },
python = { "blue" },
scss = { { "prettierd", "prettier" } },
sh = { "shfmt" },
typescript = { { "prettierd", "prettier" } },
typescriptreact = { { "prettierd", "prettier" } },
zsh = { "shfmt" },
}, },
format_on_save = function(bufnr) format_on_save = function(bufnr)
-- Disable with a global or buffer-local variable -- Disable with a global or buffer-local variable

View file

@ -60,6 +60,7 @@ return {
pyright = {}, pyright = {},
rust_analyzer = {}, rust_analyzer = {},
sqlls = {}, sqlls = {},
nimlsp = {},
tsserver = { tsserver = {
init_options = { init_options = {
preferences = { preferences = {

View file

@ -5,12 +5,13 @@ return {
build = ":MasonUpdate", build = ":MasonUpdate",
opts = { opts = {
ensure_installed = { ensure_installed = {
"blue",
"eslint_d", "eslint_d",
"markdownlint",
"nimlsp",
"prettierd",
"shellcheck", "shellcheck",
"stylua", "stylua",
"blue",
"prettierd",
"markdownlint",
}, },
}, },
} }