mirror of
https://codeberg.org/Mo8it/dotfiles.git
synced 2024-10-17 20:52:40 +00:00
Add autocmd.lua with autoresize
This commit is contained in:
parent
e12b18915f
commit
e020e813ae
5 changed files with 19 additions and 13 deletions
|
@ -18,7 +18,7 @@ os:
|
|||
editCommandTemplate: "{{editor}} +{{line}} -- {{filename}}"
|
||||
|
||||
refresher:
|
||||
refreshInterval: 2
|
||||
refreshInterval: 1
|
||||
|
||||
update:
|
||||
method: prompt
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
require("options")
|
||||
require("autocmd")
|
||||
require("plugins")
|
||||
|
||||
--
|
||||
|
||||
-- Load all plugin configurations
|
||||
local f = io.popen("fd --base-directory ~/.config/nvim/lua/plugins -t f --exact-depth 1 | rg '..(.+).lua' -r '$1'")
|
||||
local f = io.popen("fd --base-directory ~/.config/nvim/lua/plugins -t f --exact-depth 1 -x echo {/.}")
|
||||
local plugin_names = f:lines()
|
||||
|
||||
for plugin_name in plugin_names do
|
||||
|
|
15
.config/nvim/lua/autocmd.lua
Normal file
15
.config/nvim/lua/autocmd.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
-- Highlight on yank
|
||||
local function custom_highlight_on_yank()
|
||||
vim.highlight.on_yank({ timeout = 1200 })
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
pattern = "*",
|
||||
callback = custom_highlight_on_yank,
|
||||
})
|
||||
|
||||
-- Autoresize
|
||||
vim.api.nvim_create_autocmd("VimResized", {
|
||||
pattern = "*",
|
||||
command = "wincmd =",
|
||||
})
|
|
@ -43,15 +43,5 @@ o.pumblend = 10
|
|||
|
||||
o.guifont = "JetBrainsMono Nerd Font Mono"
|
||||
|
||||
-- Highlight on yank
|
||||
local function custom_highlight_on_yank()
|
||||
return vim.highlight.on_yank({ timeout = 1200 })
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
pattern = "*",
|
||||
callback = custom_highlight_on_yank,
|
||||
})
|
||||
|
||||
-- Disable diagnostics
|
||||
vim.diagnostic.disable()
|
||||
|
|
|
@ -96,7 +96,7 @@ local cmp = require("cmp")
|
|||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
|
|
Loading…
Reference in a new issue