summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYigit Sever2021-10-19 10:11:59 +0300
committerYigit Sever2021-10-19 10:11:59 +0300
commit2228aaea4acd6248ea289e86bf9233dc482760d2 (patch)
treec03a2b1e6b7dd5f91853894b9e709b8d22544faa
parentc18510305e625c5ef9b8178a42ad239098972c76 (diff)
downloaddotfiles-2228aaea4acd6248ea289e86bf9233dc482760d2.tar.gz
dotfiles-2228aaea4acd6248ea289e86bf9233dc482760d2.tar.bz2
dotfiles-2228aaea4acd6248ea289e86bf9233dc482760d2.zip
nvim: remove fern, use nvim-tree
-rw-r--r--.config/nvim/lua/mappings.lua5
-rw-r--r--.config/nvim/lua/plugin_settings.lua68
-rw-r--r--.config/nvim/lua/plugins.lua5
-rw-r--r--.config/nvim/lua/settings.lua2
4 files changed, 76 insertions, 4 deletions
diff --git a/.config/nvim/lua/mappings.lua b/.config/nvim/lua/mappings.lua
index 6c17177..234f051 100644
--- a/.config/nvim/lua/mappings.lua
+++ b/.config/nvim/lua/mappings.lua
@@ -167,4 +167,9 @@ map('n', '<Leader>cn', ':DashboardNewFile<CR>')
167 167
168-- toggle rose pine theme 168-- toggle rose pine theme
169map('n', 'cz', [[<cmd>lua require('rose-pine.functions').toggle_variant({'dawn', 'base'})<cr>]], { noremap = true, silent = true }) 169map('n', 'cz', [[<cmd>lua require('rose-pine.functions').toggle_variant({'dawn', 'base'})<cr>]], { noremap = true, silent = true })
170
171map('n', 'vt', ':NvimTreeToggle<CR>')
172map('n', 'vr', ':NvimTreeRefresh<CR>')
173map('n', 'vs', ':NvimTreeFindFile<CR>')
174
170-- }}} plug mappings -- 175-- }}} plug mappings --
diff --git a/.config/nvim/lua/plugin_settings.lua b/.config/nvim/lua/plugin_settings.lua
index 2dfbaeb..0ca647a 100644
--- a/.config/nvim/lua/plugin_settings.lua
+++ b/.config/nvim/lua/plugin_settings.lua
@@ -392,3 +392,71 @@ npairs.add_rule(Rule('%"','%"',"remind"))
392 392
393 393
394-- }}} nvim-autopairs -- 394-- }}} nvim-autopairs --
395
396-- nvim-tree {{{ --
397
398require'nvim-tree'.setup {
399 disable_netrw = true,
400 hijack_netrw = true,
401 open_on_setup = false,
402 ignore_ft_on_setup = {},
403 -- closes neovim automatically when the tree is the last **WINDOW** in the view
404 auto_close = true,
405 open_on_tab = false,
406 -- hijacks new directory buffers when they are opened.
407 update_to_buf_dir = {
408 -- enable the feature
409 enable = true,
410 -- allow to open the tree if it was previously closed
411 auto_open = true,
412 },
413 -- hijack the cursor in the tree to put it at the start of the filename
414 hijack_cursor = false,
415 -- updates the root directory of the tree on `DirChanged` (when your run `:cd` usually)
416 update_cwd = true,
417 -- show lsp diagnostics in the signcolumn
418 diagnostics = {
419 enable = false,
420 icons = {
421 hint = "❔",
422 info = "❕",
423 warning = "❗",
424 error = "❌",
425 }
426 },
427 -- update the focused file on `BufEnter`, un-collapses the folders recursively until it finds the file
428 update_focused_file = {
429 -- enables the feature
430 enable = false,
431 -- update the root directory of the tree to the one of the folder containing the file if the file is not under the current root directory
432 update_cwd = false,
433 -- list of buffer names / filetypes that will not update the cwd if the file isn't found under the current root directory
434 ignore_list = {}
435 },
436 -- configuration options for the system open command (`s` in the tree by default)
437 system_open = {
438 -- the command to run this, leaving nil should work in most cases
439 cmd = nil,
440 -- the command arguments as a list
441 args = {}
442 },
443
444 view = {
445 -- width of the window, can be either a number (columns) or a string in `%`, for left or right side placement
446 width = 30,
447 -- height of the window, can be either a number (columns) or a string in `%`, for top or bottom side placement
448 height = 30,
449 -- side of the tree, can be one of 'left' | 'right' | 'top' | 'bottom'
450 side = 'left',
451 -- if true the tree will resize itself after opening a file
452 auto_resize = false,
453 mappings = {
454 -- custom only false will merge the list with the default mappings
455 -- if true, it will only use your list to set the mappings
456 custom_only = false,
457 -- list of mappings to set on the tree manually
458 list = {}
459 }
460 }
461}
462-- }}} nvim-tree --
diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua
index 055aa2d..d8ef949 100644
--- a/.config/nvim/lua/plugins.lua
+++ b/.config/nvim/lua/plugins.lua
@@ -63,10 +63,7 @@ return require('packer').startup(function()
63 use 'ledger/vim-ledger' 63 use 'ledger/vim-ledger'
64 64
65 -- file explorer 65 -- file explorer
66 use 'lambdalisue/fern.vim' 66 use 'kyazdani42/nvim-tree.lua'
67 -- bug in neovim, so required for now
68 -- https://github.com/lambdalisue/fern.vim/issues/120
69 use 'antoinemadec/FixCursorHold.nvim'
70 67
71 -- viewer & finder for lsp symbols and tags 68 -- viewer & finder for lsp symbols and tags
72 use 'liuchengxu/vista.vim' 69 use 'liuchengxu/vista.vim'
diff --git a/.config/nvim/lua/settings.lua b/.config/nvim/lua/settings.lua
index fbc28ac..34e68b2 100644
--- a/.config/nvim/lua/settings.lua
+++ b/.config/nvim/lua/settings.lua
@@ -12,6 +12,8 @@ local opt = vim.opt -- convenient :set
12 12
13-- look & feel 13-- look & feel
14o.termguicolors = true 14o.termguicolors = true
15-- Disable italics
16vim.g.rose_pine_disable_italics = true
15vim.cmd('colorscheme rose-pine') 17vim.cmd('colorscheme rose-pine')
16 18
17-- interact with system clipboard 19-- interact with system clipboard