diff --git a/cli/fish/config.fish b/cli/fish/config.fish index 5d96c16..3f00e68 100644 --- a/cli/fish/config.fish +++ b/cli/fish/config.fish @@ -27,6 +27,7 @@ if status is-interactive # === nnn configuration set -gx NNN_PLUG 'c:fzcd;m:nmount;x:!chmod +x $nnn;X:!chmod -x $nnn;d:dragdrop;p:preview-tui' set -gx NNN_FIFO /tmp/nnn.fifo + set -gx NNN_ARCHIVE '\.(7z|a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|rar|rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)$' # === bat configuration set -gx BAT_THEME 'OneHalfDark' diff --git a/cli/vim/neovim/init.lua b/cli/vim/neovim/init.lua index ed09a52..681da0b 100644 --- a/cli/vim/neovim/init.lua +++ b/cli/vim/neovim/init.lua @@ -23,6 +23,7 @@ vim.o.mouse = "a" -- window options vim.wo.number = true +vim.wo.relativenumber = true -- more require("keybindings") diff --git a/cli/vim/neovim/lua/keybindings.lua b/cli/vim/neovim/lua/keybindings.lua index 9a9dc91..9517806 100644 --- a/cli/vim/neovim/lua/keybindings.lua +++ b/cli/vim/neovim/lua/keybindings.lua @@ -25,6 +25,8 @@ keymap(NORMAL, 'l', 'l', { noremap = true }) keymap(NORMAL, 'oo', 'o', { noremap = true }) keymap(NORMAL, '', ':noh', { noremap = true }) keymap(NORMAL, '', ':Telescope find_files follow=true', { noremap = true }) +keymap(NORMAL, 't', ':NvimTreeToggle', { noremap = true }) +keymap(NORMAL, 'tf', ':NvimTreeFindFile', { noremap = true }) keymap(NORMAL, 'ts', ':Telescope live_grep', { noremap = true }) keymap(NORMAL, 'tt', ':Telescope file_browser path=%:p:h', { noremap = true }) keymap(NORMAL, 'tb', ':Telescope buffers', { noremap = true }) diff --git a/cli/vim/neovim/lua/plugins.lua b/cli/vim/neovim/lua/plugins.lua index 08e4228..093b87d 100644 --- a/cli/vim/neovim/lua/plugins.lua +++ b/cli/vim/neovim/lua/plugins.lua @@ -6,6 +6,7 @@ require("packer").startup(function(use) use "jiangmiao/auto-pairs" use "tpope/vim-fugitive" use "ellisonleao/gruvbox.nvim" + use "editorconfig/editorconfig-vim" -- nvim-surround use({ @@ -18,7 +19,7 @@ require("packer").startup(function(use) "nvim-telescope/telescope.nvim", requires = { {"nvim-lua/plenary.nvim"} }, } - use "nvim-telescope/telescope-file-browser.nvim" + -- use "nvim-telescope/telescope-file-browser.nvim" -- bufferline use { @@ -48,6 +49,9 @@ require("packer").startup(function(use) -- comment use "numToStr/Comment.nvim" + + -- filetree + use "kyazdani42/nvim-tree.lua" end) @@ -56,3 +60,4 @@ require("plugins/lsp") require("plugins/bufferline") require("plugins/statusline") require("plugins/comment") +require("plugins/tree") diff --git a/cli/vim/neovim/lua/plugins/lsp.lua b/cli/vim/neovim/lua/plugins/lsp.lua index 10b901a..b5c3720 100644 --- a/cli/vim/neovim/lua/plugins/lsp.lua +++ b/cli/vim/neovim/lua/plugins/lsp.lua @@ -54,10 +54,11 @@ if not cmp_status_ok then return end +local luasnip_status_ok, luasnip = pcall(require, "luasnip") + cmp.setup { snippet = { expand = function(args) - local luasnip_status_ok, luasnip = pcall(require, "luasnip") if luasnip_status_ok then luasnip.lsp_expand(args.body) end @@ -74,7 +75,7 @@ cmp.setup { [''] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() - elseif luasnip.expand_or_jumpable() then + elseif luasnip_status_ok and luasnip.expand_or_jumpable() then luasnip.expand_or_jump() else fallback() @@ -83,7 +84,7 @@ cmp.setup { [''] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() - elseif luasnip.jumpable(-1) then + elseif luasnip_status_ok and luasnip.jumpable(-1) then luasnip.jump(-1) else fallback() diff --git a/cli/vim/neovim/lua/plugins/telescope.lua b/cli/vim/neovim/lua/plugins/telescope.lua index a35add5..d4433bf 100644 --- a/cli/vim/neovim/lua/plugins/telescope.lua +++ b/cli/vim/neovim/lua/plugins/telescope.lua @@ -3,10 +3,9 @@ if not telescope_ok then return end -telescope.load_extension "file_browser" +-- telescope.load_extension "file_browser" telescope.setup({ extensions = { - file_browser = { - } + -- file_browser = {} } }) diff --git a/cli/vim/neovim/lua/plugins/tree.lua b/cli/vim/neovim/lua/plugins/tree.lua new file mode 100644 index 0000000..6424ab9 --- /dev/null +++ b/cli/vim/neovim/lua/plugins/tree.lua @@ -0,0 +1,7 @@ +local nvim_tree_ok, nvim_tree = pcall(require, "nvim-tree") +if not nvim_tree_ok then + return +end + +nvim_tree.setup{} +