switch nerdtree to nvim-tree.lua
This commit is contained in:
parent
91c7ded024
commit
299167feb7
@ -1,7 +1,7 @@
|
||||
# Generated by Powerlevel10k configuration wizard on 2021-08-23 at 14:33 CEST.
|
||||
# Generated by Powerlevel10k configuration wizard on 2021-09-16 at 15:20 CEST.
|
||||
# Based on romkatv/powerlevel10k/config/p10k-pure.zsh.
|
||||
# Wizard options: nerdfont-complete + powerline, large icons, pure, snazzy, rpromt,
|
||||
# 1 line, compact, instant_prompt=verbose.
|
||||
# Wizard options: nerdfont-complete + powerline, small icons, pure, rpromt, 1 line,
|
||||
# compact, transient_prompt, instant_prompt=verbose.
|
||||
# Type `p10k configure` to generate another config.
|
||||
#
|
||||
# Config file for Powerlevel10k with the style of Pure (https://github.com/sindresorhus/pure).
|
||||
@ -39,12 +39,12 @@
|
||||
|
||||
# Prompt colors.
|
||||
local grey='242'
|
||||
local red='#FF5C57'
|
||||
local yellow='#F3F99D'
|
||||
local blue='#57C7FF'
|
||||
local magenta='#FF6AC1'
|
||||
local cyan='#9AEDFE'
|
||||
local white='#F1F1F0'
|
||||
local red='1'
|
||||
local yellow='3'
|
||||
local blue='4'
|
||||
local magenta='5'
|
||||
local cyan='6'
|
||||
local white='7'
|
||||
|
||||
# Left prompt segments.
|
||||
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
|
||||
@ -161,7 +161,7 @@
|
||||
# - always: Trim down prompt when accepting a command line.
|
||||
# - same-dir: Trim down prompt when accepting a command line unless this is the first command
|
||||
# typed after changing current working directory.
|
||||
typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off
|
||||
typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always
|
||||
|
||||
# Instant prompt mode.
|
||||
#
|
||||
|
@ -13,11 +13,13 @@ paq:setup({verbose = true}) {
|
||||
"nvim-lua/plenary.nvim",
|
||||
-- Theming Plugins
|
||||
"kaicataldo/material.vim",
|
||||
"ryanoasis/vim-devicons",
|
||||
"xiyaowong/nvim-transparent",
|
||||
-- Layout Plugins
|
||||
"preservim/nerdtree",
|
||||
"jistr/vim-nerdtree-tabs",
|
||||
--"preservim/nerdtree",
|
||||
--"unkiwii/vim-nerdtree-sync",
|
||||
"kyazdani42/nvim-web-devicons",
|
||||
"kyazdani42/nvim-tree.lua",
|
||||
"karb94/neoscroll.nvim",
|
||||
-- Code Navigation
|
||||
"junegunn/fzf",
|
||||
"nvim-lua/popup.nvim",
|
||||
@ -27,6 +29,7 @@ paq:setup({verbose = true}) {
|
||||
-- Obsidian / Roam features
|
||||
"lervag/wiki.vim",
|
||||
-- Syntax / Autocomplete
|
||||
"preservim/nerdcommenter",
|
||||
"neovim/nvim-lspconfig",
|
||||
"kabouzeid/nvim-lspinstall",
|
||||
"nvim-lua/lsp-status.nvim",
|
||||
@ -57,12 +60,15 @@ if u.has_plugin("cmp") then
|
||||
-- Apply Theme
|
||||
o.syntax = "enable"
|
||||
o.termguicolors = true
|
||||
g.NERDTreeShowHidden = true
|
||||
g.NERDTreeAutoDeleteBuffer = true
|
||||
g.NERDTreeMinimalUI = true
|
||||
g.NERDTreeDirArrows = true
|
||||
--g.NERDTreeShowHidden = true
|
||||
--g.NERDTreeAutoDeleteBuffer = true
|
||||
--g.NERDTreeMinimalUI = true
|
||||
--g.NERDTreeDirArrows = true
|
||||
-- g.NERDTreeCustomOpenArgs = {file = {where = "t"}}
|
||||
|
||||
g.nvim_tree_auto_open = 1
|
||||
g.hidden = true
|
||||
g.filetype = true
|
||||
g.material_terminal_italics = 1
|
||||
g.material_theme_style = "darker"
|
||||
g.wiki_root = "~/Notes"
|
||||
@ -106,17 +112,18 @@ if u.has_plugin("cmp") then
|
||||
-- Toggleterm / Lazygit setup
|
||||
require "lazy-git"
|
||||
|
||||
-- Autocommands
|
||||
u.create_augroup(
|
||||
{
|
||||
{"VimEnter", "*", "if (@% == '') | NERDTree | endif"},
|
||||
{"BufEnter", "*", 'if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif'},
|
||||
{"BufWinEnter", "*", "NERDTreeMirrorOpen"}
|
||||
--{"BufEnter", "*", "if &modifiable | NERDTreeFind | wincmd p | endif"}
|
||||
},
|
||||
"Nerdtree"
|
||||
)
|
||||
require("nvim-tree.view").View.winopts.signcolumn = "no"
|
||||
|
||||
-- Autocommands
|
||||
--[[ u.create_augroup(]]
|
||||
--[[{]]
|
||||
--[[{"StdinReadPre", "*", "let s:std_in=1"},]]
|
||||
--[[{"VimEnter", "*", "if argc() == 0 && !exists('s:std_in') | NERDTree | endif"},]]
|
||||
--[[{"BufEnter", "*", 'if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif'},]]
|
||||
--[[{"BufWinEnter", "*", "if getcmdwintype() == '' | silent NERDTreeMirror | endif"}]]
|
||||
--[[},]]
|
||||
--[["Nerdtree"]]
|
||||
--[[)]]
|
||||
-- Setup rest.vim
|
||||
require("rest-nvim").setup(
|
||||
{
|
||||
@ -134,6 +141,9 @@ if u.has_plugin("cmp") then
|
||||
}
|
||||
)
|
||||
|
||||
-- Smooth Scrolling
|
||||
require("neoscroll").setup()
|
||||
|
||||
-- Autocompletion Setup
|
||||
o.completeopt = "menuone,noselect"
|
||||
require "autocomplete"
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user