plugin: nvim-tree.lua

This commit is contained in:
krolyxon 2023-10-27 21:23:07 +05:30
parent 1ac030191a
commit e1bb8a1fa4
5 changed files with 124 additions and 19 deletions

View File

@ -1,32 +1,33 @@
{
"Comment.nvim": { "branch": "master", "commit": "6821b3ae27a57f1f3cf8ed030e4a55d70d0c4e43" },
"LuaSnip": { "branch": "master", "commit": "ea7d7ea510c641c4f15042becd27f35b3e5b3c2b" },
"clangd_extensions.nvim": { "branch": "main", "commit": "6d0bf36870d15c0c2284f4b6693a66552a6bf127" },
"LuaSnip": { "branch": "master", "commit": "80a8528f084a97b624ae443a6f50ff8074ba486b" },
"clangd_extensions.nvim": { "branch": "main", "commit": "bafed83f79b5779f5b43e8e015e13ca99dcd8b3a" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"crates.nvim": { "branch": "main", "commit": "3fc7ddac13ddf65914a733ef074317c4c72ef05b" },
"friendly-snippets": { "branch": "main", "commit": "00e191fea2cfbbdd378243f35b5953296537a116" },
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
"gitsigns.nvim": { "branch": "main", "commit": "f388995990aba04cfdc7c3ab870c33e280601109" },
"harpoon": { "branch": "master", "commit": "f7040fd0c44e7a4010369136547de5604b9c22a1" },
"harpoon": { "branch": "master", "commit": "c1aebbad9e3d13f20bedb8f2ce8b3a94e39e424a" },
"indent-blankline.nvim": { "branch": "master", "commit": "8299fe7703dfff4b1752aeed271c3b95281a952d" },
"kterm": { "branch": "main", "commit": "b587868af673cc4ddf6b1bd13d65dafbfd77383e" },
"lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" },
"lazy.nvim": { "branch": "main", "commit": "9788a19ec0b4036028e78aec702634b4b89d3470" },
"lualine.nvim": { "branch": "master", "commit": "e99d733e0213ceb8f548ae6551b04ae32e590c80" },
"mason.nvim": { "branch": "main", "commit": "4546dec8b56bc56bc1d81e717e4a935bc7cd6477" },
"nvim-autopairs": { "branch": "master", "commit": "a52fc6eeec116746110b703381777c46d89d9e27" },
"nvim-autopairs": { "branch": "master", "commit": "f6c71641f6f183427a651c0ce4ba3fb89404fa9e" },
"nvim-cmp": { "branch": "main", "commit": "8202df9561b90102b41dbc1ad71945534ef4ea39" },
"nvim-colorizer.lua": { "branch": "master", "commit": "760e27df4dd966607e8fb7fd8b6b93e3c7d2e193" },
"nvim-lspconfig": { "branch": "master", "commit": "649137cbc53a044bffde36294ce3160cb18f32c7" },
"nvim-tree.lua": { "branch": "master", "commit": "78a9ca5ed6557f29cd0ce203df44213e54bfabb9" },
"nvim-treesitter": { "branch": "master", "commit": "17d7cf6f4b4057a949e86df6fbc2e271ba788823" },
"plenary.nvim": { "branch": "master", "commit": "9a0d3bf7b832818c042aaf30f692b081ddd58bd9" },
"rust-tools.nvim": { "branch": "master", "commit": "bd1aa99ffb911a1cf99b3fcf3b44c0391c57e3ef" },
"telescope.nvim": { "branch": "master", "commit": "203bf5609137600d73e8ed82703d6b0e320a5f36" },
"tokyonight.nvim": { "branch": "main", "commit": "1b0c88094548a62641ece1e668fa9a234e1c539e" },
"telescope.nvim": { "branch": "master", "commit": "74ce793a60759e3db0d265174f137fb627430355" },
"tokyonight.nvim": { "branch": "main", "commit": "e89caa3ad6d8da9d0dd981ec74a82c55adc61ffd" },
"undotree": { "branch": "master", "commit": "b6fdb95db53b7ceb23ddfe8a8211a3135d98eef0" },
"vim-fugitive": { "branch": "master", "commit": "ef99f1d90cdb33a52931aed5868785b51fb9411d" },
"vim-fugitive": { "branch": "master", "commit": "99db68d9b3304580bd383da7aaee05c7a954a344" },
"vimwiki": { "branch": "dev", "commit": "fea8bee382b2051b0137fd2cacf0862823ee69b3" },
"which-key.nvim": { "branch": "main", "commit": "5224c261825263f46f6771f1b644cae33cd06995" }
}

View File

@ -114,6 +114,18 @@ M.kterm = {
},
}
M.nvimtree = {
plugin = true,
n = {
-- toggle
["<C-n>"] = { "<cmd> NvimTreeToggle <CR>", "Toggle nvimtree" },
-- focus
["<leader>e"] = { "<cmd> NvimTreeFocus <CR>", "Focus nvimtree" },
},
}
M.telescope = {
plugin = true,

View File

@ -127,14 +127,14 @@ lspconfig.lua_ls.setup {
-- }
-- }
-- lspconfig.clangd.setup {
-- filetypes = { "c", "cpp", "objc", "objcpp", "cuda", "proto" },
-- single_file_support = true,
-- on_attach = M.on_attach,
-- capabilities = M.capabilities,
-- root_dir = vim.loop.cwd,
-- -- init_option = { fallbackFlags = { "-std=c++2a" } }
-- }
lspconfig.clangd.setup {
filetypes = { "c", "cpp", "objc", "objcpp", "cuda", "proto" },
single_file_support = true,
on_attach = M.on_attach,
capabilities = M.capabilities,
root_dir = vim.loop.cwd,
-- init_option = { fallbackFlags = { "-std=c++2a" } }
}
lspconfig.html.setup {
on_attach = M.on_attach,

View File

@ -0,0 +1,77 @@
local options = {
filters = {
dotfiles = false,
exclude = { vim.fn.stdpath "config" .. "/lua/custom" },
},
disable_netrw = true,
hijack_netrw = true,
hijack_cursor = true,
hijack_unnamed_buffer_when_opening = false,
sync_root_with_cwd = true,
update_focused_file = {
enable = true,
update_root = false,
},
view = {
adaptive_size = false,
side = "left",
width = 30,
preserve_window_proportions = true,
},
git = {
enable = false,
ignore = true,
},
filesystem_watchers = {
enable = true,
},
actions = {
open_file = {
resize_window = true,
},
},
renderer = {
root_folder_label = false,
highlight_git = false,
highlight_opened_files = "none",
indent_markers = {
enable = false,
},
icons = {
show = {
file = true,
folder = true,
folder_arrow = true,
git = false,
},
glyphs = {
default = "󰈚",
symlink = "",
folder = {
default = "",
empty = "",
empty_open = "",
open = "",
symlink = "",
symlink_open = "",
arrow_open = "",
arrow_closed = "",
},
git = {
unstaged = "",
staged = "",
unmerged = "",
renamed = "",
untracked = "",
deleted = "",
ignored = "",
},
},
},
},
}
return options

View File

@ -270,6 +270,21 @@ local plugins = {
require("core.utils").load_mappings "whichkey"
end,
},
{
"nvim-tree/nvim-tree.lua",
cmd = { "NvimTreeToggle", "NvimTreeFocus" },
init = function()
require("core.utils").load_mappings "nvimtree"
end,
opts = function()
return require "plugins.configs.nvimtree"
end,
config = function(_, opts)
require("nvim-tree").setup(opts)
end,
},
}
-- pin commits for all default plugins