📝 add lunarvim section
This commit is contained in:
parent
44dffcb1ad
commit
871618079f
1 changed files with 129 additions and 0 deletions
129
ubuntu.md
129
ubuntu.md
|
|
@ -41,3 +41,132 @@ Use thunderbird to attach to just about any mail + cal clients
|
|||
* [X] Start using keepass
|
||||
* [ ] Research version controlling DB
|
||||
* [ ] Start using a secret file to unlock DB
|
||||
|
||||
|
||||
## LunarVim
|
||||
|
||||
List all plugins
|
||||
|
||||
```lua
|
||||
{ "folke/tokyonight.nvim" },
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
cmd = "TroubleToggle",
|
||||
},
|
||||
|
||||
-- Minimap
|
||||
{
|
||||
'wfxr/minimap.vim',
|
||||
run = "cargo install --locked code-minimap",
|
||||
-- cmd = {"Minimap", "MinimapClose", "MinimapToggle", "MinimapRefresh", "MinimapUpdateHighlight"},
|
||||
config = function()
|
||||
vim.cmd("let g:minimap_width = 10")
|
||||
vim.cmd("let g:minimap_auto_start = 1")
|
||||
vim.cmd("let g:minimap_auto_start_win_enter = 1")
|
||||
end,
|
||||
},
|
||||
|
||||
-- Git helper
|
||||
{
|
||||
"tpope/vim-fugitive",
|
||||
cmd = {
|
||||
"G",
|
||||
"Git",
|
||||
"Gdiffsplit",
|
||||
"Gread",
|
||||
"Gwrite",
|
||||
"Ggrep",
|
||||
"GMove",
|
||||
"GDelete",
|
||||
"GBrowse",
|
||||
"GRemove",
|
||||
"GRename",
|
||||
"Glgrep",
|
||||
"Gedit"
|
||||
},
|
||||
ft = { "fugitive" }
|
||||
},
|
||||
|
||||
-- extend surround
|
||||
{
|
||||
"tpope/vim-surround",
|
||||
keys = { "c", "d", "y" }
|
||||
-- make sure to change the value of `timeoutlen` if it's not triggering correctly, see https://github.com/tpope/vim-surround/issues/117
|
||||
-- setup = function()
|
||||
-- vim.o.timeoutlen = 500
|
||||
-- end
|
||||
},
|
||||
|
||||
-- autosave
|
||||
{
|
||||
"Pocco81/AutoSave.nvim",
|
||||
config = function()
|
||||
require("autosave").setup()
|
||||
end,
|
||||
},
|
||||
|
||||
-- show indentation verticals
|
||||
{
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
event = "BufRead",
|
||||
setup = function()
|
||||
vim.g.indentLine_enabled = 1
|
||||
vim.g.indent_blankline_char = "▏"
|
||||
vim.g.indent_blankline_filetype_exclude = { "help", "terminal", "dashboard" }
|
||||
vim.g.indent_blankline_buftype_exclude = { "terminal" }
|
||||
vim.g.indent_blankline_show_trailing_blankline_indent = false
|
||||
vim.g.indent_blankline_show_first_indent_level = false
|
||||
end
|
||||
},
|
||||
|
||||
-- lastplace: pick up where you left off
|
||||
{
|
||||
"ethanholz/nvim-lastplace",
|
||||
event = "BufRead",
|
||||
config = function()
|
||||
require("nvim-lastplace").setup({
|
||||
lastplace_ignore_buftype = { "quickfix", "nofile", "help" },
|
||||
lastplace_ignore_filetype = {
|
||||
"gitcommit", "gitrebase", "svn", "hgcommit",
|
||||
},
|
||||
lastplace_open_folds = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- highlight words under cursor
|
||||
{
|
||||
"itchyny/vim-cursorword",
|
||||
event = { "BufEnter", "BufNewFile" },
|
||||
config = function()
|
||||
vim.api.nvim_command("augroup user_plugin_cursorword")
|
||||
vim.api.nvim_command("autocmd!")
|
||||
vim.api.nvim_command("autocmd FileType NvimTree,lspsagafinder,dashboard,vista let b:cursorword = 0")
|
||||
vim.api.nvim_command("autocmd WinEnter * if &diff || &pvw | let b:cursorword = 0 | endif")
|
||||
vim.api.nvim_command("autocmd InsertEnter * let b:cursorword = 0")
|
||||
vim.api.nvim_command("autocmd InsertLeave * let b:cursorword = 1")
|
||||
vim.api.nvim_command("augroup END")
|
||||
end
|
||||
},
|
||||
|
||||
-- smooth scrolling
|
||||
{
|
||||
"karb94/neoscroll.nvim",
|
||||
event = "WinScrolled",
|
||||
config = function()
|
||||
require('neoscroll').setup({
|
||||
-- All these keys will be mapped to their corresponding default scrolling animation
|
||||
mappings = { '<C-u>', '<C-d>', '<C-b>', '<C-f>',
|
||||
'<C-y>', '<C-e>', 'zt', 'zz', 'zb' },
|
||||
hide_cursor = true, -- Hide cursor while scrolling
|
||||
stop_eof = true, -- Stop at <EOF> when scrolling downwards
|
||||
use_local_scrolloff = false, -- Use the local scope of scrolloff instead of the global scope
|
||||
respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file
|
||||
cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further
|
||||
easing_function = nil, -- Default easing function
|
||||
pre_hook = nil, -- Function to run before the scrolling animation starts
|
||||
post_hook = nil, -- Function to run after the scrolling animation ends
|
||||
})
|
||||
end
|
||||
},
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue