Add neovim configuration files
This commit is contained in:
parent
6cd67e88ad
commit
74a974be5e
25 changed files with 8576 additions and 15 deletions
41
templates/nvim/lua/auto-commands.lua.j2
Normal file
41
templates/nvim/lua/auto-commands.lua.j2
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
-- {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||
|
||||
--colorscheme
|
||||
vim.cmd('colorscheme space_vim_theme')
|
||||
|
||||
--enable this option here as the events are used in this buffer
|
||||
vim.cmd('syntax on')
|
||||
|
||||
vim.api.nvim_create_autocmd('Syntax', {
|
||||
command = [[:normal zR]],
|
||||
desc = 'Open folds by default',
|
||||
})
|
||||
|
||||
--color trailing spaces with red color
|
||||
vim.cmd('highlight ExtraWhitespace ctermbg=green guibg=green')
|
||||
vim.cmd('match ExtraWhitespace /s+$/')
|
||||
|
||||
vim.api.nvim_create_autocmd('BufWinEnter', {
|
||||
pattern = "*",
|
||||
command = [[:match ExtraWhitespace /s+$/]],
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('InsertEnter', {
|
||||
pattern = "*",
|
||||
command = [[:match ExtraWhitespace /s+%#@<!$/]],
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('InsertLeave', {
|
||||
pattern = "*",
|
||||
command = [[:match ExtraWhitespace /s+$/]],
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('BufWinLeave', {
|
||||
pattern = "*",
|
||||
command = [[:call clearmatches()]],
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('Filetype', {
|
||||
pattern = 'TelescopeResults',
|
||||
command = [[:setlocal nofoldenable]],
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue