added vim-tree and deviocns

master
Niclas Thobaben 2024-03-08 23:01:34 +01:00
parent 67bbdbb41f
commit bd12caa708
5 changed files with 88 additions and 1 deletions

View File

@ -0,0 +1,42 @@
require'nvim-web-devicons'.setup {
-- your personnal icons can go here (to override)
-- you can specify color or cterm_color instead of specifying both of them
-- DevIcon will be appended to `name`
override = {
zsh = {
icon = "",
color = "#428850",
cterm_color = "65",
name = "Zsh"
}
};
-- globally enable different highlight colors per icon (default to true)
-- if set to false all icons will have the default icon's color
color_icons = true;
-- globally enable default icons (default to false)
-- will get overriden by `get_icons` option
default = true;
-- globally enable "strict" selection of icons - icon will be looked up in
-- different tables, first by filename, and if not found by extension; this
-- prevents cases when file doesn't have any extension but still gets some icon
-- because its name happened to match some extension (default to false)
strict = true;
-- same as `override` but specifically for overrides by filename
-- takes effect when `strict` is true
override_by_filename = {
[".gitignore"] = {
icon = "",
color = "#f1502f",
name = "Gitignore"
}
};
-- same as `override` but specifically for overrides by extension
-- takes effect when `strict` is true
override_by_extension = {
["log"] = {
icon = "",
color = "#81e043",
name = "Log"
}
};
}

View File

@ -0,0 +1,27 @@
-- disable netrw at the very start of your init.lua
--vim.g.loaded_netrw = 1
--vim.g.loaded_netrwPlugin = 1
-- optionally enable 24-bit colour
vim.opt.termguicolors = true
-- empty setup using defaults
require("nvim-tree").setup()
-- OR setup with some options
require("nvim-tree").setup({
sort = {
sorter = "case_sensitive",
},
view = {
width = 30,
},
renderer = {
group_empty = true,
},
filters = {
dotfiles = true,
},
})
vim.keymap.set("n", "<leader>pt", vim.cmd.NvimTreeOpen)

View File

@ -1,3 +1,3 @@
require("nthobaben.remap")
require("nthobaben.color")
require("nthobaben.remap")
require("nthobaben.packer")

View File

@ -24,5 +24,13 @@ return require('packer').startup(function(use)
use 'mbbill/undotree'
use 'tpope/vim-fugitive'
use {
'nvim-tree/nvim-tree.lua',
requires = {
'nvim-tree/nvim-web-devicons', -- optional
},
}
use 'nvim-tree/nvim-web-devicons'
end)

View File

@ -74,11 +74,21 @@ end
time([[try_loadstring definition]], false)
time([[Defining packer_plugins]], true)
_G.packer_plugins = {
["nvim-tree.lua"] = {
loaded = true,
path = "/home/niclasthobaben/.local/share/nvim/site/pack/packer/start/nvim-tree.lua",
url = "https://github.com/nvim-tree/nvim-tree.lua"
},
["nvim-treesitter"] = {
loaded = true,
path = "/home/niclasthobaben/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
url = "https://github.com/nvim-treesitter/nvim-treesitter"
},
["nvim-web-devicons"] = {
loaded = true,
path = "/home/niclasthobaben/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
url = "https://github.com/nvim-tree/nvim-web-devicons"
},
["packer.nvim"] = {
loaded = true,
path = "/home/niclasthobaben/.local/share/nvim/site/pack/packer/start/packer.nvim",