1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-08-31 06:48:12 +02:00

nvim: some formatting

This commit is contained in:
Henrik Hautakoski 2024-08-13 19:30:17 +02:00
parent 184e9b01ee
commit 0adb1a40eb
3 changed files with 27 additions and 28 deletions

View file

@ -2,17 +2,16 @@ local autocmd = vim.api.nvim_create_autocmd
local augroup = vim.api.nvim_create_augroup
-- Highlight on yank
autocmd('TextYankPost', {
group = vim.api.nvim_create_augroup('highlight_yank', {}),
desc = 'Hightlight selection on yank',
pattern = '*',
autocmd("TextYankPost", {
group = vim.api.nvim_create_augroup("highlight_yank", {}),
desc = "Hightlight selection on yank",
pattern = "*",
callback = function()
vim.highlight.on_yank { higroup = 'IncSearch', timeout = 400 }
vim.highlight.on_yank({ higroup = "IncSearch", timeout = 400 })
end,
})
-- Remove all trailing whitespaces on save
autocmd('BufWritePre', {
command = [[:exe 'norm m`' | %s/\s\+$//eg | norm ``]]
autocmd("BufWritePre", {
command = [[:exe 'norm m`' | %s/\s\+$//eg | norm ``]],
})

View file

@ -85,16 +85,16 @@ return {
settings = {
Lua = {
runtime = {
version = 'LuaJIT'
version = "LuaJIT",
},
workspace = {
checkThirdParty = false,
library = {
vim.env.VIMRUNTIME
}
}
}
}
vim.env.VIMRUNTIME,
},
},
},
},
},
},
}

View file

@ -34,7 +34,7 @@ return {
"hlsl",
"markdown",
"markdown_inline",
"kdl"
"kdl",
},
-- Install parsers synchronously (only applied to `ensure_installed`)
@ -55,6 +55,6 @@ return {
},
indent = {
enable = true
}
enable = true,
},
}