nvim plugins:
- nvim ts autotag (tag pairs) - obsession (session manager) - spider wbe -> A-w A-b A-e
This commit is contained in:
parent
96f29f97ca
commit
6163181156
24
.config/nvim/lua/goodhumored/plugins/auto-tags.lua
Normal file
24
.config/nvim/lua/goodhumored/plugins/auto-tags.lua
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
-- ╭─────────────────────────────────────────────────────────╮
|
||||||
|
-- │ nvim-ts-autotag │
|
||||||
|
-- │ Use treesitter to autoclose and autorename html tag │
|
||||||
|
-- │ https://github.com/windwp/nvim-ts-autotag │
|
||||||
|
-- ╰─────────────────────────────────────────────────────────╯
|
||||||
|
return {
|
||||||
|
"windwp/nvim-ts-autotag",
|
||||||
|
opts = {
|
||||||
|
opts = {
|
||||||
|
-- Defaults
|
||||||
|
enable_close = true, -- Auto close tags
|
||||||
|
enable_rename = true, -- Auto rename pairs of tags
|
||||||
|
enable_close_on_slash = false, -- Auto close on trailing </
|
||||||
|
},
|
||||||
|
-- Also override individual filetype configs, these take priority.
|
||||||
|
-- Empty by default, useful if one of the "opts" global settings
|
||||||
|
-- doesn't work well in a specific filetype
|
||||||
|
per_filetype = {
|
||||||
|
["html"] = {
|
||||||
|
enable_close = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
29
.config/nvim/lua/goodhumored/plugins/obsession.lua
Normal file
29
.config/nvim/lua/goodhumored/plugins/obsession.lua
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
-- # obsession.vim
|
||||||
|
--
|
||||||
|
-- Vim features a `:mksession` command to write a file containing the current
|
||||||
|
-- state of Vim: window positions, open folds, stuff like that. For most of my
|
||||||
|
-- existence, I found the interface way too awkward and manual to be useful, but
|
||||||
|
-- I've recently discovered that the only thing standing between me and simple,
|
||||||
|
-- no-hassle Vim sessions is a few tweaks:
|
||||||
|
--
|
||||||
|
-- * Instead of making me remember to capture the session immediately before
|
||||||
|
-- exiting Vim, allow me to do it at any time, and automatically re-invoke
|
||||||
|
-- `:mksession` immediately before exit.
|
||||||
|
-- * Also invoke `:mksession` whenever the layout changes (in particular, on
|
||||||
|
-- `BufEnter`), so that even if Vim exits abnormally, I'm good to go.
|
||||||
|
-- * If I load an existing session, automatically keep it updated as above.
|
||||||
|
-- * If I try to create a new session on top of an existing session, don't refuse
|
||||||
|
-- to overwrite it. Just do what I mean.
|
||||||
|
-- * If I pass in a directory rather than a file name, just create a
|
||||||
|
-- `Session.vim` inside of it.
|
||||||
|
-- * Don't capture options and maps. Options are sometimes mutilated and maps
|
||||||
|
-- just interfere with updating plugins.
|
||||||
|
--
|
||||||
|
-- Use `:Obsess` (with optional file/directory name) to start recording to a
|
||||||
|
-- session file and `:Obsess!` to stop and throw it away. That's it. Load a
|
||||||
|
-- session in the usual manner: `vim -S`, or `:source` it.
|
||||||
|
--
|
||||||
|
-- There's also an indicator you can put in `'statusline'`, `'tabline'`, or
|
||||||
|
-- `'titlestring'`. See `:help obsession-status`.
|
||||||
|
|
||||||
|
return { "tpope/vim-obsession" }
|
@ -8,17 +8,17 @@ return {
|
|||||||
"chrisgrieser/nvim-spider",
|
"chrisgrieser/nvim-spider",
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
"e",
|
"<M-e>",
|
||||||
"<cmd>lua require('spider').motion('e')<CR>",
|
"<cmd>lua require('spider').motion('e')<CR>",
|
||||||
mode = { "n", "o", "x" },
|
mode = { "n", "o", "x" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"w",
|
"<M-w>",
|
||||||
"<cmd>lua require('spider').motion('w')<CR>",
|
"<cmd>lua require('spider').motion('w')<CR>",
|
||||||
mode = { "n", "o", "x" },
|
mode = { "n", "o", "x" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"b",
|
"<M-b>",
|
||||||
"<cmd>lua require('spider').motion('b')<CR>",
|
"<cmd>lua require('spider').motion('b')<CR>",
|
||||||
mode = { "n", "o", "x" },
|
mode = { "n", "o", "x" },
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user