summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua
diff options
context:
space:
mode:
authorYigit Sever2021-10-08 13:50:04 +0300
committerYigit Sever2021-10-08 13:50:04 +0300
commit1c0aa32806e097a2a0c30b760ae4cad481e758c6 (patch)
tree853e8f17dec94f0c42e88003b1d906abfb7f28ec /.config/nvim/lua
parent484188c99b21e668f40b84b21d1b21f5b9ce8d9e (diff)
downloaddotfiles-1c0aa32806e097a2a0c30b760ae4cad481e758c6.tar.gz
dotfiles-1c0aa32806e097a2a0c30b760ae4cad481e758c6.tar.bz2
dotfiles-1c0aa32806e097a2a0c30b760ae4cad481e758c6.zip
nvim: ported wiki functions
Diffstat (limited to '.config/nvim/lua')
-rw-r--r--.config/nvim/lua/mappings.lua21
-rw-r--r--.config/nvim/lua/plugin_settings.lua16
2 files changed, 28 insertions, 9 deletions
diff --git a/.config/nvim/lua/mappings.lua b/.config/nvim/lua/mappings.lua
index fe59a99..f27ac1b 100644
--- a/.config/nvim/lua/mappings.lua
+++ b/.config/nvim/lua/mappings.lua
@@ -84,6 +84,18 @@ map('n', '<Leader>cd', ':cd %:p:h<CR>:pwd<CR>')
84-- press \g and start writing prose 84-- press \g and start writing prose
85map('n', '<Leader>g', ':Goyo<CR>') 85map('n', '<Leader>g', ':Goyo<CR>')
86 86
87-- call CreatePaper on word below cursor
88map('n', '<leader>np', 'gewi[[/papers/<ESC>Ea]]<ESC>bb:call CreatePaper(expand("<cword>"))<CR>')
89
90-- link paper
91map('n', '<leader>lp', 'gewi[[/papers/<ESC>Ea]]<ESC>')
92
93-- call CreateReference on word below cursor
94map('n', '<leader>nr', ':call CreateReference(expand("<cword>"))<CR>')
95
96-- create a new note
97map('n', '<leader>nn', ':call CreateNote()<CR>')
98
87-- plug mappings {{{1 -- 99-- plug mappings {{{1 --
88 100
89-- <Plug> mappings should not be noremap 101-- <Plug> mappings should not be noremap
@@ -101,8 +113,8 @@ plugmap('n', '<Leader>`', '<Plug>Sneak_S')
101plugmap('n', "'", '`') 113plugmap('n', "'", '`')
102 114
103-- use the special yoink paste that rotates 115-- use the special yoink paste that rotates
104plugmap('n', 'p', '<Plug>(YoinkPaste_p)') 116plugmap('n', 'p', '<Plug>(YoinkPaste_p)')
105plugmap('n', 'P', '<Plug>(YoinkPaste_P)') 117plugmap('n', 'P', '<Plug>(YoinkPaste_P)')
106 118
107-- substitute from yank 119-- substitute from yank
108plugmap('n', '<Leader>ys', '<plug>(SubversiveSubstitute)') 120plugmap('n', '<Leader>ys', '<plug>(SubversiveSubstitute)')
@@ -128,4 +140,9 @@ plugmap('i', '<c-x><c-k>', '<plug>(fzf-complete-word)')
128plugmap('i', '<c-x><c-f>', '<plug>(fzf-complete-path)') 140plugmap('i', '<c-x><c-f>', '<plug>(fzf-complete-path)')
129plugmap('i', '<c-x><c-l>', '<plug>(fzf-complete-line)') 141plugmap('i', '<c-x><c-l>', '<plug>(fzf-complete-line)')
130 142
143-- checkmarks on vimwiki
144plugmap('n', '<leader>v', '<Plug>VimwikiToggleListItem')
145-- add/increase header level
146plugmap('n', '<leader>a', '<Plug>VimwikiAddHeaderLevel')
147
131-- 1}}} -- 148-- 1}}} --
diff --git a/.config/nvim/lua/plugin_settings.lua b/.config/nvim/lua/plugin_settings.lua
index b10a002..4e28726 100644
--- a/.config/nvim/lua/plugin_settings.lua
+++ b/.config/nvim/lua/plugin_settings.lua
@@ -101,13 +101,6 @@ g.UltiSnipsExpandTrigger = "<C-l>"
101g.UltiSnipsEnableSnipMate = "1" 101g.UltiSnipsEnableSnipMate = "1"
102-- }}} UltiSnips -- 102-- }}} UltiSnips --
103 103
104-- float preview
105g["float_preview#docked"] = 0
106
107-- highlight on yank
108cmd('highlight HighlightedyankRegion cterm=reverse gui=reverse')
109g.highlightedyank_highlight_duration = 200
110
111-- beacon {{{ -- 104-- beacon {{{ --
112g.beacon_size = 100 105g.beacon_size = 100
113g.beacon_shrink = 1 106g.beacon_shrink = 1
@@ -124,3 +117,12 @@ g.slime_paste_file = "/home/yigit/.slime_paste"
124g.vimtex_view_method = 'zathura' 117g.vimtex_view_method = 'zathura'
125g.vimtex_quickfix_mode = 0 118g.vimtex_quickfix_mode = 0
126-- }}} vimtex -- 119-- }}} vimtex --
120
121vim.g.polyglot_disabled={'latex', 'tex'}
122
123-- float preview
124g["float_preview#docked"] = 0
125
126-- highlight on yank
127cmd('highlight HighlightedyankRegion cterm=reverse gui=reverse')
128g.highlightedyank_highlight_duration = 200