improve tree
This commit is contained in:
@@ -3,6 +3,5 @@ local ok, comment = pcall(require, "Comment")
|
|||||||
if not ok then
|
if not ok then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Load plugin
|
--- Load plugin
|
||||||
comment.setup()
|
comment.setup()
|
||||||
|
|||||||
@@ -1,2 +1,12 @@
|
|||||||
require("config/comment")
|
require("config/comment")
|
||||||
require("config/bufferline")
|
require("config/bufferline")
|
||||||
|
require("config/gitsigns")
|
||||||
|
require("config/indent-blankline")
|
||||||
|
require("config/lualine")
|
||||||
|
require("config/nvim-autopairs")
|
||||||
|
require("config/nvim-tree")
|
||||||
|
require("config/nvim-treesitter")
|
||||||
|
require("config/onedark")
|
||||||
|
require("config/rainbow-delimiters")
|
||||||
|
require("config/telescope")
|
||||||
|
require("config/which-key")
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
version = "*",
|
version = "*",
|
||||||
dependencies = "nvim-tree/nvim-web-devicons",
|
dependencies = "nvim-tree/nvim-web-devicons",
|
||||||
config = config
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,3 @@
|
|||||||
local function config()
|
|
||||||
--- Ensure plugin is avaiable
|
|
||||||
local gitsigns = require('gitsigns')
|
|
||||||
|
|
||||||
--- Load plugin
|
|
||||||
gitsigns.setup()
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
config = config
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,3 @@
|
|||||||
local function config()
|
|
||||||
--- Ensure plugin is avaiable
|
|
||||||
local ibl = require("ibl")
|
|
||||||
|
|
||||||
--- Load plugin
|
|
||||||
ibl.setup()
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
config = config,
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,35 +1,6 @@
|
|||||||
local function config()
|
|
||||||
--- Ensure plugins are avaiable
|
|
||||||
local lualine = require("lualine")
|
|
||||||
local lazy_status = require("lazy.status")
|
|
||||||
|
|
||||||
--- Plugin options
|
|
||||||
opts = {
|
|
||||||
options = {
|
|
||||||
theme = "onedark",
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_x = {
|
|
||||||
{
|
|
||||||
lazy_status.updates,
|
|
||||||
cond = lazy_status.has_updates,
|
|
||||||
color = { fg = "#ff9e64" },
|
|
||||||
},
|
|
||||||
{ "encoding" },
|
|
||||||
{ "fileformat" },
|
|
||||||
{ "filetype" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
--- Load plugin
|
|
||||||
lualine.setup(opts)
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'nvim-lualine/lualine.nvim',
|
'nvim-lualine/lualine.nvim',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-tree/nvim-web-devicons', opt = true
|
'nvim-tree/nvim-web-devicons', opt = true
|
||||||
},
|
},
|
||||||
config = config
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,4 @@
|
|||||||
local function config()
|
|
||||||
--- Ensure plugin is avaiable
|
|
||||||
local nvimautopairs = require("nvim-autopairs")
|
|
||||||
|
|
||||||
--- Load plugin
|
|
||||||
nvimautopairs.setup()
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'windwp/nvim-autopairs',
|
'windwp/nvim-autopairs',
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
config = config
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,50 +1,3 @@
|
|||||||
local function config()
|
|
||||||
--- Ensure plugin is avaiable
|
|
||||||
local nvimtree = require("nvim-tree")
|
|
||||||
|
|
||||||
--- Unload netrw
|
|
||||||
vim.g.loaded_netrw = 1
|
|
||||||
vim.g.loaded_netrwPlugin = 1
|
|
||||||
|
|
||||||
--- Plugin options
|
|
||||||
local opts = {
|
|
||||||
sort = {
|
|
||||||
-- sorter = "case_sensitive",
|
|
||||||
},
|
|
||||||
view = {
|
|
||||||
width = 30,
|
|
||||||
},
|
|
||||||
renderer = {
|
|
||||||
group_empty = true,
|
|
||||||
indent_markers = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
icons = {
|
|
||||||
glyphs = {
|
|
||||||
folder = {
|
|
||||||
arrow_closed = "", -- arrow when folder is closed
|
|
||||||
arrow_open = "", -- arrow when folder is open
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
filters = {
|
|
||||||
dotfiles = false,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
--- Load plugin
|
|
||||||
nvimtree.setup(opts)
|
|
||||||
|
|
||||||
--- Override keymap
|
|
||||||
local km = vim.keymap.set
|
|
||||||
km('n', '<C-e>', ':NvimTreeFocus<cr>')
|
|
||||||
km('n', '<leader>ee', ':NvimTreeToggle<cr>')
|
|
||||||
km('n', '<leader>ef', ':NvimTreeFindFileToggle<cr>')
|
|
||||||
km('n', '<leader>ec', ':NvimTreeCollapse<cr>')
|
|
||||||
km('n', '<leader>er', ':NvimTreeRefresh<cr>')
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"nvim-tree/nvim-tree.lua",
|
"nvim-tree/nvim-tree.lua",
|
||||||
version = "*",
|
version = "*",
|
||||||
@@ -52,5 +5,4 @@ return {
|
|||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
},
|
},
|
||||||
config = config
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,33 +1,4 @@
|
|||||||
local function config()
|
|
||||||
--- Ensure plugin is avaiable
|
|
||||||
local treesitter = require("nvim-treesitter.configs")
|
|
||||||
|
|
||||||
--- Plugin options
|
|
||||||
opts = {
|
|
||||||
highlight = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
autotag = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
auto_install = true,
|
|
||||||
incremental_selection = {
|
|
||||||
enable = true,
|
|
||||||
keymaps = {
|
|
||||||
init_selection = "<leader>ss",
|
|
||||||
node_incremental = false,
|
|
||||||
scope_incremental = false,
|
|
||||||
node_decremental = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
--- Load plugin
|
|
||||||
treesitter.setup(opts)
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
config = config
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
local function config()
|
|
||||||
require('onedark').load()
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"navarasu/onedark.nvim",
|
"navarasu/onedark.nvim",
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
|
|||||||
@@ -1,33 +1,4 @@
|
|||||||
local function config()
|
|
||||||
local rainbow_delimiters = require 'rainbow-delimiters'
|
|
||||||
|
|
||||||
vim.g.rainbow_delimiters = {
|
|
||||||
strategy = {
|
|
||||||
[''] = rainbow_delimiters.strategy['global'],
|
|
||||||
vim = rainbow_delimiters.strategy['local'],
|
|
||||||
},
|
|
||||||
query = {
|
|
||||||
[''] = 'rainbow-delimiters',
|
|
||||||
lua = 'rainbow-blocks',
|
|
||||||
},
|
|
||||||
priority = {
|
|
||||||
[''] = 110,
|
|
||||||
lua = 210,
|
|
||||||
},
|
|
||||||
highlight = {
|
|
||||||
'RainbowDelimiterYellow',
|
|
||||||
'RainbowDelimiterBlue',
|
|
||||||
'RainbowDelimiterOrange',
|
|
||||||
'RainbowDelimiterGreen',
|
|
||||||
'RainbowDelimiterViolet',
|
|
||||||
'RainbowDelimiterCyan',
|
|
||||||
'RainbowDelimiterRed',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"hiphish/rainbow-delimiters.nvim",
|
"hiphish/rainbow-delimiters.nvim",
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
config = config
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,4 @@
|
|||||||
local function config()
|
|
||||||
--- Ensute telescope is installed
|
|
||||||
local builtin = require('telescope.builtin')
|
|
||||||
--- Override keymaps
|
|
||||||
local km = vim.keymap.set
|
|
||||||
km('n', '<leader>ff', builtin.find_files)
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'nvim-telescope/telescope.nvim', tag = '0.1.5',
|
'nvim-telescope/telescope.nvim', tag = '0.1.5',
|
||||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||||
config = config
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,31 +1,4 @@
|
|||||||
local function config()
|
|
||||||
--- Ensure plugin is avaiable
|
|
||||||
local wk = require("which-key")
|
|
||||||
|
|
||||||
--- Global options
|
|
||||||
vim.o.timeout = true
|
|
||||||
vim.o.timeoutlen = 300
|
|
||||||
|
|
||||||
--- Add description to leader group
|
|
||||||
wk.register({
|
|
||||||
n = {
|
|
||||||
name = "NoHighLight",
|
|
||||||
},
|
|
||||||
e = {
|
|
||||||
name = "NvimTree",
|
|
||||||
},
|
|
||||||
f = {
|
|
||||||
name = "Telescope"
|
|
||||||
},
|
|
||||||
}, { prefix = "<leader>" })
|
|
||||||
|
|
||||||
--- Override keymap
|
|
||||||
local km = vim.keymap.set
|
|
||||||
km('n', '<C-s>', ':WhichKey<cr>', { desc = "Which-key" })
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
config = config
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user