summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorChris <[email protected]>2021-03-17 03:23:23 -0400
committerChris <[email protected]>2021-03-17 03:23:23 -0400
commit784fdcf19d8fa48da50fd33dc15462f1c4da60a4 (patch)
tree4af219a151786d540f9c66492c0d230c69f55b4d /lua
parent20b8eb1c330dbfbaf951d3a18430190bc5e51eca (diff)
updates
Diffstat (limited to 'lua')
-rw-r--r--lua/keymappings.lua6
-rw-r--r--lua/nv-far/init.lua66
-rw-r--r--lua/nv-utils/init.lua4
-rw-r--r--lua/plugins.lua4
4 files changed, 78 insertions, 2 deletions
diff --git a/lua/keymappings.lua b/lua/keymappings.lua
index b5a57924..8080d4b1 100644
--- a/lua/keymappings.lua
+++ b/lua/keymappings.lua
@@ -65,3 +65,9 @@ vim.cmd('inoremap <expr> <c-k> (\"\\<C-p>\")')
-- TAB Complete
--vim.api.nvim_set_keymap('i', '<expr><TAB>', 'pumvisible() ? \"\\<C-n>\" : \"\\<TAB>\"', { noremap = true, silent = true })
+vim.cmd([[
+map p <Plug>(miniyank-autoput)
+map P <Plug>(miniyank-autoPut)
+map <leader>n <Plug>(miniyank-cycle)
+map <leader>N <Plug>(miniyank-cycleback)
+]])
diff --git a/lua/nv-far/init.lua b/lua/nv-far/init.lua
new file mode 100644
index 00000000..6564d816
--- /dev/null
+++ b/lua/nv-far/init.lua
@@ -0,0 +1,66 @@
+vim.cmd([[
+set lazyredraw " improve scrolling performance when navigating through large results
+
+let g:far#window_width=50
+" Use %:p with buffer option only
+let g:far#file_mask_favorites=['%:p', '**/*.*', '**/*.js', '**/*.py', '**/*.java', '**/*.css', '**/*.html', '**/*.vim', '**/*.cpp', '**/*.c', '**/*.h', ]
+let g:far#window_min_content_width=30
+let g:far#enable_undo=1
+
+" let g:far#ignore_files=['$HOME/.config/nvim/utils/farignore']
+" let g:far#ignore_files=['node_modules/']
+
+" Below are the default mappings and corresponding variable names in
+
+" x v_x - Exclude item under the cursor.
+
+" i v_i - Include item under the cursor.
+
+" t v_t - Toggle item exclusion under the cursor.
+
+" f v_f - Smartly toggle item exclusion under the cursor: exclude all items when all are excluded, otherwise exclude all items.
+
+" X - Exclude all items.
+
+" I - Include all items.
+
+" T - Toggle exclusion for all items.
+
+" F - Smartly toggle exclusion for all items: include all items when all are excluded, otherwise exclude all items.
+
+" <CR> - Jump to the source code of the item under the cursor. See |far-jump|
+
+" p - Open preview window (if not) and scroll to the item under the cursor. See |far-preview|
+
+" P - Close preview window. See |far-preview|
+
+" CTRL-K - Scroll preview window up (if open). See |far-preview|, |g:far#preview_window_scroll_step|
+
+" CTRL-J - Scroll preview window down (if open). See |far-preview|, |g:far#preview_window_scroll_step|
+
+" zo - Expand node under the cursor.
+
+" zc - Collapse node under the cursor.
+
+" za - Toggle node expanding under the cursor.
+
+" zs - Smartly toggle exclusion for all nodes: expand all nodes when all are collapsed, otherwise collapse all nodes.
+
+" zr v_zr - Expand all nodes.
+
+" zm v_zm - Collapse all nodes.
+
+" zA v_zA - Toggle exclusion for all nodes.
+
+" zS v_zS - Smartly toggle exclusion for all nodes: expand all nodes when all are collapsed, otherwise collapse all nodes.
+
+" s v_s - Execute |:Fardo|<CR>, to replace all included items.
+
+" u v_s - Execute |:Farundo|<CR>, to undo the last replacement by |:Fardo|.
+
+" U v_U - Execute |:Farundo| --all=1<CR>, to undo all replacements by |:Fardo|. For param '--all=' see |farundo-params|.
+
+" q v_q - Close searching result buffer and its preview buffer (if exists)
+
+]])
+
diff --git a/lua/nv-utils/init.lua b/lua/nv-utils/init.lua
index fff4ded7..fa94d260 100644
--- a/lua/nv-utils/init.lua
+++ b/lua/nv-utils/init.lua
@@ -29,7 +29,9 @@ function_wrapper.define_augroups(
{'BufNewFile', '*', 'setlocal formatoptions-=c formatoptions-=r formatoptions-=o'},
{'FileType', 'java', 'luafile ~/.config/nvim/lua/lsp/java-ls.lua'},
{'FileType', 'java', 'nnoremap ca <Cmd>lua require(\'jdtls\').code_action()<CR>'},
-
+ {'FileType', 'java', 'nnoremap ca <Cmd>lua require(\'jdtls\').code_action()<CR>'},
+ {'User', 'GoyoLeave', 'lua require(\'galaxyline\').disable_galaxyline()'},
+ {'User', 'GoyoEnter', 'lua require(\'galaxyline\').galaxyline_augroup()'},
},
}
)
diff --git a/lua/plugins.lua b/lua/plugins.lua
index 242d83c9..202574d8 100644
--- a/lua/plugins.lua
+++ b/lua/plugins.lua
@@ -117,5 +117,7 @@ return require('packer').startup(function(use)
--use 'suy/vim-context-commentstring'
-- use 'b3nj5m1n/kommentary'
use 'andymass/vim-matchup'
- use 'sheerun/vim-polyglot'
+ use 'junegunn/goyo.vim'
+ use 'bfredl/nvim-miniyank'
+ use 'brooth/far.vim'
end)