Skip to content

Commit

Permalink
Configure typos
Browse files Browse the repository at this point in the history
  • Loading branch information
b-ggs committed Feb 20, 2024
1 parent 9a1e84b commit 754a664
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nvim/.config/nvim/lua/plugins/conform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ return {
},
},
opts = {
-- https://github.com/stevearc/conform.nvim#formatters
-- :help conform-formatters

formatters_by_ft = {
css = { "prettier" },
javascript = { "prettier" },
Expand All @@ -22,7 +25,7 @@ return {
markdown = { "prettier" },
python = { "ruff_fix", "ruff_format" },
yaml = { "prettier" },
["*"] = { "trim_whitespace" },
["*"] = { "trim_whitespace", "typos" },
},
},
}
2 changes: 2 additions & 0 deletions nvim/.config/nvim/lua/plugins/mason-tool-installer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ return {
"ruff-lsp",
"tailwindcss-language-server",
"typescript-language-server",
"typos-lsp",
-- Linters & formatters
"prettier",
"ruff",
"stylua",
"typos",
},
run_on_start = false,
},
Expand Down
7 changes: 7 additions & 0 deletions nvim/.config/nvim/lua/plugins/nvim-lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ return {
local lspconfig = require("lspconfig")
local capabilities = require("cmp_nvim_lsp").default_capabilities()

-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
-- :help lspconfig-all

lspconfig.cssls.setup({
capabilities = capabilities,
})
Expand Down Expand Up @@ -36,6 +39,10 @@ return {
capabilities = capabilities,
})

lspconfig.typos_lsp.setup({
capabilities = capabilities,
})

vim.keymap.set("n", "ge", vim.diagnostic.open_float, { desc = "diagnostic open float" })
vim.keymap.set("n", "gp", vim.diagnostic.goto_prev, { desc = "diagnostic goto prev" })
vim.keymap.set("n", "gn", vim.diagnostic.goto_next, { desc = "diagnostic goto next" })
Expand Down

0 comments on commit 754a664

Please sign in to comment.