mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
wip
This commit is contained in:
parent
12b6749545
commit
528964b3e7
9 changed files with 73 additions and 12 deletions
|
|
@ -16,9 +16,35 @@ return {
|
|||
-- hijack_netrw_behavior = "disabled",
|
||||
--},
|
||||
})
|
||||
|
||||
local function toggle_neotree()
|
||||
local api = vim.api
|
||||
local win = api.nvim_get_current_win()
|
||||
local bufs = api.nvim_list_bufs()
|
||||
|
||||
for _, buf in ipairs(bufs) do
|
||||
local name = api.nvim_buf_get_name(buf)
|
||||
if name:match("neo%-tree filesystem") then
|
||||
api.nvim_command(":Neotree close")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
api.nvim_command(":Neotree")
|
||||
end
|
||||
|
||||
require("which-key").add({
|
||||
{ "<leader>e", ":Neotree<CR>", desc = "Neotree" }
|
||||
{ "<leader>e", toggle_neotree, desc = "File Explorer" }
|
||||
})
|
||||
|
||||
vim.fn.sign_define("DiagnosticSignError",
|
||||
{text = " ", texthl = "DiagnosticSignError"})
|
||||
vim.fn.sign_define("DiagnosticSignWarn",
|
||||
{text = " ", texthl = "DiagnosticSignWarn"})
|
||||
vim.fn.sign_define("DiagnosticSignInfo",
|
||||
{text = " ", texthl = "DiagnosticSignInfo"})
|
||||
vim.fn.sign_define("DiagnosticSignHint",
|
||||
{text = "", texthl = "DiagnosticSignHint"})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue