mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
feat(nvim): Build another nvim from scratch
* Neovim: Backup original LazyVim setup to .config/nvim.lazy.d * Neovim: Currently done with basic completions and LSP * Git: Always use ssh to connect github remote * Zsh: Add more antidots config
This commit is contained in:
parent
74f2883139
commit
eeb3387112
53 changed files with 1617 additions and 682 deletions
41
.config/nvim/lua/plugins/mod/nvim-tree.lua
Normal file
41
.config/nvim/lua/plugins/mod/nvim-tree.lua
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
local function my_on_attach(bufnr)
|
||||
-- local keymaps = require("config.keymaps")
|
||||
local api = require "nvim-tree.api"
|
||||
local default_mode = { "n" }
|
||||
local keymaps = require("config.keymaps")
|
||||
|
||||
local function opts(desc)
|
||||
return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
|
||||
end
|
||||
|
||||
|
||||
local function set_keymaps(maps)
|
||||
for _, map in ipairs(maps) do
|
||||
local mode = map.mode or default_mode
|
||||
vim.keymap.set(mode, map.keys, map.cmd, map.opts)
|
||||
end
|
||||
end
|
||||
|
||||
local raw_keymaps = keymaps.nvim_tree_keymaps(api, opts)
|
||||
set_keymaps(raw_keymaps)
|
||||
end
|
||||
|
||||
return {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
version = "*",
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
config = function()
|
||||
require("nvim-tree").setup {
|
||||
on_attach = my_on_attach,
|
||||
sync_root_with_cwd = true,
|
||||
respect_buf_cwd = true,
|
||||
update_focused_file = {
|
||||
enable = true,
|
||||
update_cwd = true,
|
||||
},
|
||||
}
|
||||
end
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue