Initial Commit
- Add NvimTree to the distribution. - Add notes on keybindings
This commit is contained in:
parent
32744c3f66
commit
e2a17ca6bc
4 changed files with 70 additions and 77 deletions
44
init.lua
44
init.lua
|
|
@ -7,9 +7,53 @@ if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
|
|||
vim.cmd [[packadd packer.nvim]]
|
||||
end
|
||||
|
||||
|
||||
-- For nvim-tree
|
||||
-- disable netrw at the very start of your init.lua (strongly advised)
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
-- set termguicolors to enable highlight groups
|
||||
vim.opt.termguicolors = true
|
||||
-- vim.g.nvim_tree_show_icons = {
|
||||
-- folders = 0,
|
||||
-- files = 0,
|
||||
-- git = 0,
|
||||
-- folder_arrows = 0,
|
||||
-- }
|
||||
local function open_nvim_tree(data)
|
||||
-- buffer is a directory
|
||||
local directory = vim.fn.isdirectory(data.file) == 1
|
||||
if not directory then
|
||||
return
|
||||
end
|
||||
-- change to the directory
|
||||
vim.cmd.cd(data.file)
|
||||
-- open the tree
|
||||
require("nvim-tree.api").tree.open()
|
||||
end
|
||||
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
|
||||
|
||||
require('packer').startup(function(use)
|
||||
-- Package manager
|
||||
use 'wbthomason/packer.nvim'
|
||||
|
||||
-- TODO: Should I move lower?
|
||||
-- Directory tree in NVIM.
|
||||
use {
|
||||
'nvim-tree/nvim-tree.lua',
|
||||
config = function ()
|
||||
require('nvim-tree').setup({
|
||||
renderer = {
|
||||
icons = {
|
||||
show = {
|
||||
file = false,
|
||||
folder = false
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
}
|
||||
|
||||
use { -- LSP Configuration & Plugins
|
||||
'neovim/nvim-lspconfig',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue