switch nerdtree to nvim-tree.lua

This commit is contained in:
2021-09-22 11:44:12 +02:00
parent 91c7ded024
commit 299167feb7
4 changed files with 45 additions and 31 deletions

View File

@ -9,14 +9,17 @@ map("n", " ", "<Nop>", remap)
g.mapleader = " "
map("n", "<C-p>", ":Telescope find_files<CR>", options)
map("n", "<C-f>", ":Telescope grep_string<CR>", options);
map("n", "<Leader><C-f>", ":Telescope live_grep<CR>", options);
map("n", "<C-f>", ":Telescope grep_string<CR>", options)
map("n", "<Leader><C-f>", ":Telescope live_grep<CR>", options)
-- Navigate Buffers
map("n", "<C-h>", "<C-w>h", options)
map("n", "<C-j>", "<C-w>j", options)
map("n", "<C-k>", "<C-w>k", options)
map("n", "<C-l>", "<C-w>l", options)
-- Find file in NvimTree
map("n", "<C-f>", ":NvimTreeFindFile<CR><c-w>", options)
-- I aint no weak boy
map("n", "<Left>", ":echo 'No Left for you'<CR><i><dw>", options)
map("n", "<Right>", ":echo 'No Right for you'<CR><dw>", options)
@ -30,7 +33,7 @@ map("n", "<Leader>r", "<cmd>lua require('rest-nvim').run()<CR>", options)
map("n", "<Leader>q", "<Esc>:q<CR>", options)
-- Open Nerdtree
map("n", "<F6>", ":NERDTreeToggle<CR>", options)
map("n", "<C-n>", ":NvimTreeToggle<CR>", options)
-- Make ctrl+s work
map("n", "<C-s>", "<Esc>:w<CR>", options)

View File

@ -1,5 +1,6 @@
local nvim_lsp = require "lspconfig"
local lsp_status = require("lsp-status")
local utils = require("utils")
-- function to attach completion when setting up lsp
local function on_attach(client)
@ -21,7 +22,7 @@ local function on_attach(client)
buf_set_keymap("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
buf_set_keymap("n", "<space>e", "<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>", opts)
buf_set_keymap("n", "<space>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
buf_set_keymap("n", "<C-.>", "<cmd>lua vim.lsp.buf.code_action()<CR>", opts)
buf_set_keymap("n", "<space><C-f>", "<cmd>lua vim.lsp.buf.code_action()<CR>", opts)
buf_set_keymap("n", "[d", "<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>", opts)
buf_set_keymap("n", "]d", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>", opts)