Updated nvim setup
This commit is contained in:
parent
5e1b2c1569
commit
1699bd2574
5 changed files with 35 additions and 51 deletions
|
|
@ -1,7 +1,3 @@
|
|||
if true then
|
||||
return {}
|
||||
end
|
||||
|
||||
return {
|
||||
"saghen/blink.cmp",
|
||||
opts = {
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
opts = {
|
||||
window = {
|
||||
width = 40,
|
||||
},
|
||||
filesystem = {
|
||||
window = {
|
||||
mappings = {
|
||||
["<C-l>"] = function(state)
|
||||
local node = state.tree:get_node()
|
||||
|
||||
if vim.fn.fnamemodify(node.path, ":e") == "opto" then
|
||||
vim.cmd.Optolith()
|
||||
return
|
||||
end
|
||||
|
||||
os.execute(string.format('xdg-open "%s" &> /dev/null &', node.path))
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>e",
|
||||
function()
|
||||
local filesystemState = require("neo-tree.sources.manager").get_state("filesystem")
|
||||
local fsPath = table.concat(filesystemState.default_expanded_nodes)
|
||||
|
||||
require("neo-tree.command").execute({ toggle = true, dir = fsPath })
|
||||
end,
|
||||
desc = "Explorer NeoTree (reopen)",
|
||||
},
|
||||
},
|
||||
}
|
||||
28
.config/nvim/lua/plugins/snacks.lua
Normal file
28
.config/nvim/lua/plugins/snacks.lua
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
local explorerConfig = {
|
||||
actions = {
|
||||
openWithApp = function(picker)
|
||||
local path = picker:selected({ fallback = true })[1].file
|
||||
|
||||
local filename = vim.fn.fnamemodify(path, ":t")
|
||||
vim.notify(filename, "info", {
|
||||
title = "Opening...",
|
||||
})
|
||||
|
||||
os.execute(string.format('xdg-open "%s" &> /dev/null &', path))
|
||||
end,
|
||||
},
|
||||
win = {
|
||||
list = {
|
||||
keys = {
|
||||
["L"] = "openWithApp",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return {
|
||||
"folke/snacks.nvim",
|
||||
opts = {
|
||||
picker = explorerConfig,
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue