home: vim: use actual lua files
Since most of the settings are actually just lua in a VimL file.
This commit is contained in:
parent
9530864b10
commit
c2d231d3f1
20 changed files with 0 additions and 41 deletions
20
home/vim/plugin/signtoggle.lua
Normal file
20
home/vim/plugin/signtoggle.lua
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
local signtoggle = vim.api.nvim_create_augroup("signtoggle", { clear = true })
|
||||
|
||||
-- Only show sign column for the currently focused buffer
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "FocusGained", "WinEnter" }, {
|
||||
pattern = "*",
|
||||
group = signtoggle,
|
||||
command = "setlocal signcolumn=yes",
|
||||
})
|
||||
vim.api.nvim_create_autocmd({ "BufLeave", "FocusLost", "WinLeave" }, {
|
||||
pattern = "*",
|
||||
group = signtoggle,
|
||||
command = "setlocal signcolumn=yes",
|
||||
})
|
||||
|
||||
-- Never show the sign column in a terminal buffer
|
||||
vim.api.nvim_create_autocmd({ "TermOpen" }, {
|
||||
pattern = "*",
|
||||
group = signtoggle,
|
||||
command = "setlocal signcolumn=no",
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue