stuff
This commit is contained in:
parent
022744c075
commit
c7594f3e40
3 changed files with 6 additions and 43 deletions
|
|
@ -1,5 +0,0 @@
|
||||||
vim.o.wrap = false
|
|
||||||
|
|
||||||
vim.treesitter.start()
|
|
||||||
-- vim.wo[0][0].foldexpr = 'v:lua.vim.treesitter.foldexpr()'
|
|
||||||
-- vim.wo[0][0].foldmethod = 'expr'
|
|
||||||
|
|
@ -80,33 +80,7 @@ vim.api.nvim_create_autocmd("UIEnter", {
|
||||||
|
|
||||||
-- Print the line number in front of each line
|
-- Print the line number in front of each line
|
||||||
vim.o.number = true
|
vim.o.number = true
|
||||||
|
vim.o.relativenumber = true
|
||||||
local numbertoggle_group = vim.api.nvim_create_augroup("numbertoggle", {})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({ "BufEnter", "FocusGained", "InsertLeave", "CmdlineLeave", "WinEnter" }, {
|
|
||||||
pattern = "*",
|
|
||||||
group = numbertoggle_group,
|
|
||||||
callback = function()
|
|
||||||
if vim.o.nu and vim.api.nvim_get_mode().mode ~= "i" then
|
|
||||||
vim.opt.relativenumber = true
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({ "BufLeave", "FocusLost", "InsertEnter", "CmdlineEnter", "WinLeave" }, {
|
|
||||||
pattern = "*",
|
|
||||||
group = numbertoggle_group,
|
|
||||||
callback = function()
|
|
||||||
if vim.o.nu then
|
|
||||||
vim.opt.relativenumber = false
|
|
||||||
-- Conditional taken from https://github.com/rockyzhang24/dotfiles/commit/03dd14b5d43f812661b88c4660c03d714132abcf
|
|
||||||
-- Workaround for https://github.com/neovim/neovim/issues/32068
|
|
||||||
if not vim.tbl_contains({ "@", "-" }, vim.v.event.cmdtype) then
|
|
||||||
vim.cmd("redraw")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- [[ Create user commands ]]
|
-- [[ Create user commands ]]
|
||||||
-- See `:h nvim_create_user_command()` and `:h user-commands`
|
-- See `:h nvim_create_user_command()` and `:h user-commands`
|
||||||
|
|
@ -245,17 +219,7 @@ vim.api.nvim_create_user_command("DapInit", function()
|
||||||
end, { desc = "Initialize Debug Adater Protocol support" })
|
end, { desc = "Initialize Debug Adater Protocol support" })
|
||||||
|
|
||||||
-- [[ UI Configuration ]]
|
-- [[ UI Configuration ]]
|
||||||
vim.pack.add({
|
vim.pack.add({ "https://github.com/nvim-mini/mini.nvim" })
|
||||||
"https://github.com/nvim-mini/mini.completion",
|
|
||||||
"https://github.com/nvim-mini/mini.snippets",
|
|
||||||
"https://github.com/nvim-mini/mini.icons",
|
|
||||||
"https://github.com/nvim-mini/mini.statusline",
|
|
||||||
"https://github.com/nvim-mini/mini-git",
|
|
||||||
"https://github.com/nvim-mini/mini.diff",
|
|
||||||
"https://github.com/nvim-mini/mini.clue",
|
|
||||||
"https://github.com/nvim-mini/mini.hipatterns",
|
|
||||||
"https://github.com/nvim-mini/mini.notify",
|
|
||||||
}, { confirm = false })
|
|
||||||
|
|
||||||
vim.o.winborder = "none"
|
vim.o.winborder = "none"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,10 @@
|
||||||
"rev": "29ec27f60bf4b63e447c851d9061c434d80795a6",
|
"rev": "29ec27f60bf4b63e447c851d9061c434d80795a6",
|
||||||
"src": "https://github.com/nvim-mini/mini.notify"
|
"src": "https://github.com/nvim-mini/mini.notify"
|
||||||
},
|
},
|
||||||
|
"mini.nvim": {
|
||||||
|
"rev": "8c40d95931cbe6138391af9180e59439ed2e69df",
|
||||||
|
"src": "https://github.com/nvim-mini/mini.nvim"
|
||||||
|
},
|
||||||
"mini.snippets": {
|
"mini.snippets": {
|
||||||
"rev": "b4065ca6b33e4df2897672d3bb760cfc93f4390a",
|
"rev": "b4065ca6b33e4df2897672d3bb760cfc93f4390a",
|
||||||
"src": "https://github.com/nvim-mini/mini.snippets"
|
"src": "https://github.com/nvim-mini/mini.snippets"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue