You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
480 B
Lua
17 lines
480 B
Lua
3 years ago
|
-- Highlight on yank
|
||
|
vim.cmd('au TextYankPost * lua vim.highlight.on_yank {on_visual = false}' )-- disabled in visual mode
|
||
|
|
||
|
-- Trim Whitespace
|
||
|
vim.api.nvim_exec([[
|
||
|
fun! TrimWhitespace()
|
||
|
let l:save = winsaveview()
|
||
|
keeppatterns %s/\s\+$//e
|
||
|
call winrestview(l:save)
|
||
|
endfun
|
||
|
augroup AUTOCOMMANDGROUP
|
||
|
autocmd!
|
||
|
autocmd BufWritePre * :call TrimWhitespace()
|
||
|
autocmd BufEnter,BufWinEnter,TabEnter *.rs :lua require'lsp_extensions'.inlay_hints{}
|
||
|
augroup END
|
||
|
]], false)
|