diff options
author | Minijackson <minijackson@riseup.net> | 2022-05-02 13:42:29 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2022-05-02 13:42:29 +0200 |
commit | ec3c701d84eb6cb48ceeb2365c1733f998cc87aa (patch) | |
tree | efa16e2cd7586f477d446c8986cce8987a60f5ec | |
parent | 2739a633374147c7f9991bead075a86e7b5453c1 (diff) | |
download | nixos-config-reborn-ec3c701d84eb6cb48ceeb2365c1733f998cc87aa.tar.gz nixos-config-reborn-ec3c701d84eb6cb48ceeb2365c1733f998cc87aa.zip |
vim: use vim.opt were useful
-rw-r--r-- | dotfiles/vim.lua | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/dotfiles/vim.lua b/dotfiles/vim.lua index 7269c14..619cb9b 100644 --- a/dotfiles/vim.lua +++ b/dotfiles/vim.lua | |||
@@ -3,9 +3,9 @@ | |||
3 | 3 | ||
4 | vim.o.undofile = true | 4 | vim.o.undofile = true |
5 | vim.o.backup = true | 5 | vim.o.backup = true |
6 | vim.cmd "set backupdir-=." | 6 | vim.opt.backupdir:remove(".") |
7 | 7 | ||
8 | vim.cmd "set shortmess+=c" | 8 | vim.opt.shortmess:append("c") |
9 | 9 | ||
10 | vim.o.mouse = "a" | 10 | vim.o.mouse = "a" |
11 | 11 | ||
@@ -26,8 +26,8 @@ vim.o.cursorline = true | |||
26 | 26 | ||
27 | vim.o.title = true | 27 | vim.o.title = true |
28 | 28 | ||
29 | vim.o.wildmode = "longest:full,full" | 29 | vim.opt.wildmode = { "longest:full", "full" } |
30 | vim.o.completeopt = "menu,menuone,preview,noinsert,noselect" | 30 | vim.opt.completeopt = { "menu", "menuone", "preview", "noinsert", "noselect" } |
31 | 31 | ||
32 | -- Use ripgrep | 32 | -- Use ripgrep |
33 | vim.o.grepprg = vim.g.ripgrep_path .. " --vimgrep --smart-case" | 33 | vim.o.grepprg = vim.g.ripgrep_path .. " --vimgrep --smart-case" |
@@ -39,10 +39,14 @@ vim.o.background = "dark" | |||
39 | -- Mode already shown by the status line | 39 | -- Mode already shown by the status line |
40 | vim.o.showmode = false | 40 | vim.o.showmode = false |
41 | 41 | ||
42 | -- Do not set "trail:-" because it messes up the highlighting | 42 | vim.opt.listchars = { |
43 | vim.opt.listchars = { extends = ">", precedes = "<", nbsp = "+" } | 43 | extends = ">", |
44 | nbsp = "+", | ||
45 | precedes = "<", | ||
46 | tab = " ", | ||
47 | trail = "-", | ||
48 | } | ||
44 | vim.wo.list = true | 49 | vim.wo.list = true |
45 | vim.o.fillchars = "fold:─,vert:│" | ||
46 | 50 | ||
47 | -- Leaders | 51 | -- Leaders |
48 | ---------- | 52 | ---------- |