[nvim] cleanup: format all files through LSP

This commit is contained in:
David JULIEN 2023-02-19 17:23:52 +01:00
parent 0e1e60f532
commit 34dc364d9f
8 changed files with 77 additions and 75 deletions

View File

@ -36,7 +36,7 @@ vim.keymap.set({ "t" }, "<leader><Esc>",
-- yank and pasting -- yank and pasting
vim.keymap.set({ "n", "x" }, "<leader>y", vim.keymap.set({ "n", "x" }, "<leader>y",
"\"+y", "\"+y",
{ desc = "Yank to clipboard"} { desc = "Yank to clipboard" }
) )
vim.keymap.set("n", "<leader>p", vim.keymap.set("n", "<leader>p",
"\"+P", "\"+P",
@ -95,9 +95,11 @@ vim.keymap.set("n", "<leader>tk",
{ desc = "Search through keymaps" } { desc = "Search through keymaps" }
) )
vim.keymap.set("n", "<leader>tx", vim.keymap.set("n", "<leader>tx",
function() require("telescope.builtin").diagnostics( function()
require("telescope.builtin").diagnostics(
{ buffnr = 0 } { buffnr = 0 }
) end, )
end,
{ desc = "Search through LSP diagnostics" } { desc = "Search through LSP diagnostics" }
) )

View File

@ -5,6 +5,7 @@
local M = {} local M = {}
M.setup = function(opts) end M.setup = function(opts)
end
return M return M

View File

@ -24,7 +24,6 @@ return {
"williamboman/mason-lspconfig.nvim", "williamboman/mason-lspconfig.nvim",
}, },
config = function() config = function()
vim.diagnostic.config({ vim.diagnostic.config({
underline = true, underline = true,
update_in_insert = false, update_in_insert = false,

View File

@ -15,4 +15,3 @@ M.setup = function(opts)
end end
return M return M

View File

@ -6,6 +6,7 @@
local M = {} local M = {}
M.setup = function(opts) end M.setup = function(opts)
end
return M return M

View File

@ -57,14 +57,14 @@ opt.backspace = { "indent", "eol", "start" }
-- augroups -- augroups
utils.create_augroup({ utils.create_augroup({
{"BufWritePre", "*", "%s/\\s\\+$//e"} { "BufWritePre", "*", "%s/\\s\\+$//e" }
}, "remove_trailing_whitespaces") }, "remove_trailing_whitespaces")
utils.create_augroup({ utils.create_augroup({
{"BufNewFile,BufRead", "*.mom", "set filetype=groff"}, { "BufNewFile,BufRead", "*.mom", "set filetype=groff" },
{"BufNewFile,BufRead", "*.tex", "set filetype=tex"}, { "BufNewFile,BufRead", "*.tex", "set filetype=tex" },
}, "enforce_filetypes") }, "enforce_filetypes")
vim.api.nvim_create_autocmd({"BufEnter", "BufWinEnter"}, { vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
pattern = {"*.njk"}, pattern = { "*.njk" },
callback = function() vim.bo.filetype="html" end, callback = function() vim.bo.filetype = "html" end,
}) })