modified nvim-tree and added rich presence
This commit is contained in:
parent
407fd0e146
commit
cd27e72e25
2 changed files with 69 additions and 17 deletions
|
@ -1,22 +1,51 @@
|
||||||
return {
|
return {
|
||||||
"nvim-tree/nvim-tree.lua",
|
"nvim-tree/nvim-tree.lua",
|
||||||
dependencies = {'nvim-tree/nvim-web-devicons'},
|
dependencies = {'nvim-tree/nvim-web-devicons'},
|
||||||
config = function()
|
config = function()
|
||||||
-- disable netrw at the very start of your init.lua
|
-- disable netrw at the very start of your init.lua
|
||||||
vim.g.loaded_netrw = 1
|
vim.g.loaded_netrw = 1
|
||||||
vim.g.loaded_netrwPlugin = 1
|
vim.g.loaded_netrwPlugin = 1
|
||||||
|
|
||||||
-- set termguicolors to enable highlight groups
|
-- set termguicolors to enable highlight groups
|
||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
|
|
||||||
-- empty setup using defaults
|
-- empty setup using defaults
|
||||||
require("nvim-tree").setup()
|
require("nvim-tree").setup{
|
||||||
local focus = function()
|
renderer = {
|
||||||
vim.cmd("NvimTreeClose")
|
-- These icons are visible when you install web-devicons
|
||||||
vim.cmd("NvimTreeOpen")
|
icons = {
|
||||||
|
glyphs = {
|
||||||
|
default = "",
|
||||||
|
symlink = "",
|
||||||
|
folder = {
|
||||||
|
arrow_open = "",
|
||||||
|
arrow_closed = "",
|
||||||
|
default = "",
|
||||||
|
open = "",
|
||||||
|
empty = "",
|
||||||
|
empty_open = "",
|
||||||
|
symlink = " ",
|
||||||
|
symlink_open = " ",
|
||||||
|
},
|
||||||
|
git = {
|
||||||
|
unstaged = " ",
|
||||||
|
staged = " ",
|
||||||
|
unmerged = " ",
|
||||||
|
renamed = " ➜",
|
||||||
|
untracked = " ",
|
||||||
|
deleted = " ",
|
||||||
|
ignored = " ◌",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
local focus = function()
|
||||||
|
vim.cmd("NvimTreeClose")
|
||||||
|
vim.cmd("NvimTreeOpen")
|
||||||
|
end
|
||||||
|
vim.cmd([[command! NvimTreeFocus lua require("nvim-tree").focus() ]])
|
||||||
|
vim.keymap.set("n", "<leader>ee", ":NvimTreeToggle <CR>")
|
||||||
|
vim.keymap.set("n", "<leader>ef", ":NvimTreeFocus <CR>")
|
||||||
end
|
end
|
||||||
vim.cmd([[command! NvimTreeFocus lua require("nvim-tree").focus() ]])
|
|
||||||
vim.keymap.set("n", "<leader>ee", ":NvimTreeToggle <CR>")
|
|
||||||
vim.keymap.set("n", "<leader>ef", ":NvimTreeFocus <CR>")
|
|
||||||
end
|
|
||||||
}
|
}
|
||||||
|
|
23
lua/Dario48/plugins/presence.lua
Normal file
23
lua/Dario48/plugins/presence.lua
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
return{
|
||||||
|
'andweeb/presence.nvim',
|
||||||
|
config = function ()
|
||||||
|
-- The setup config table shows all available config options with their default values:
|
||||||
|
require("presence").setup({
|
||||||
|
-- General options
|
||||||
|
auto_update = true, -- Update activity based on autocmd events (if `false`, map or manually execute `:lua package.loaded.presence:update()`)
|
||||||
|
neovim_image_text = "The One True Text Editor", -- Text displayed when hovered over the Neovim image
|
||||||
|
main_image = "neovim", -- Main image display (either "neovim" or "file")
|
||||||
|
buttons = true, -- Configure Rich Presence button(s), either a boolean to enable/disable, a static table (`{{ label = "<label>", url = "<url>" }, ...}`, or a function(buffer: string, repo_url: string|nil): table)
|
||||||
|
show_time = true, -- Show the timer
|
||||||
|
|
||||||
|
-- Rich Presence text options
|
||||||
|
editing_text = "Editing %s", -- Format string rendered when an editable file is loaded in the buffer (either string or function(filename: string): string)
|
||||||
|
file_explorer_text = "Browsing %s", -- Format string rendered when browsing a file explorer (either string or function(file_explorer_name: string): string)
|
||||||
|
git_commit_text = "Committing changes", -- Format string rendered when committing changes in git (either string or function(filename: string): string)
|
||||||
|
plugin_manager_text = "Managing plugins", -- Format string rendered when managing plugins (either string or function(plugin_manager_name: string): string)
|
||||||
|
reading_text = "Reading %s", -- Format string rendered when a read-only or unmodifiable file is loaded in the buffer (either string or function(filename: string): string)
|
||||||
|
workspace_text = "Working on %s", -- Format string rendered when in a git repository (either string or function(project_name: string|nil, filename: string): string)
|
||||||
|
line_number_text = "Line %s out of %s", -- Format string rendered when `enable_line_number` is set to true (either string or function(line_number: number, line_count: number): string)
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue