Strip trailing spaces in Neovim

This commit is contained in:
Trevor Vallender 2023-03-24 10:52:17 +00:00
parent 6a9f957bc9
commit d7064ca62c
1 changed files with 6 additions and 0 deletions

View File

@ -17,6 +17,12 @@ require("gruvbox").setup({
}) })
vim.cmd([[colorscheme gruvbox]]) vim.cmd([[colorscheme gruvbox]])
-- Strip trailing spaces
vim.api.nvim_create_autocmd({"BufWritePre"}, {
pattern = { "*" },
command = [[%s/\s\+$//e]],
})
-- Nvim-tree -- Nvim-tree
require("nvim-tree").setup({ require("nvim-tree").setup({
sort_by = "case_sensitive", sort_by = "case_sensitive",