summaryrefslogtreecommitdiff
path: root/lua/config.lua
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2023-04-06 21:35:40 +0200
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2023-04-06 21:35:40 +0200
commit23959a977ff6b6cc1165f5489c88bc62f39b3ec2 (patch)
tree327bdaed60ddcd94f6de74f7fe54dd5e6ead4ba5 /lua/config.lua
parent3a53259185d3ab2f57d78c561760cef5eeee16a0 (diff)
Indent lines stuff
Diffstat (limited to 'lua/config.lua')
-rw-r--r--lua/config.lua24
1 files changed, 22 insertions, 2 deletions
diff --git a/lua/config.lua b/lua/config.lua
index cbe7560..f02493d 100644
--- a/lua/config.lua
+++ b/lua/config.lua
@@ -23,8 +23,28 @@ vim.o.encoding = "utf-8"
vim.o.autoread = true
vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "CursorHoldI", "FocusGained" }, {
- command = "if mode() != 'c' | checktime | endif",
- pattern = { "*" },
+ command = "if mode() != 'c' | checktime | endif",
+ pattern = { "*" },
})
vim.o.cinoptions = "l1,g0,N-s,(s,U1,w1,Ws"
+
+vim.o.list = true
+vim.o.listchars = "lead:ยท"
+
+require("indent_blankline").setup {
+ show_current_context = false,
+ show_current_context_start = false,
+ char_blankline = " ",
+}
+
+vim.api.nvim_create_autocmd({ "BufWritePre" }, {
+ pattern = {"*"},
+ callback = function(ev)
+ save_cursor = vim.fn.getpos(".")
+ vim.cmd("%s/\\s\\+$//e")
+ vim.fn.setpos(".", save_cursor)
+ end,
+})
+
+