Updated nvim setup

This commit is contained in:
Michel Fedde 2025-02-16 21:40:18 +01:00
parent 5e1b2c1569
commit 1699bd2574
5 changed files with 35 additions and 51 deletions

View file

@ -1,7 +1,3 @@
if true then
return {}
end
return {
"saghen/blink.cmp",
opts = {

View file

@ -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)",
},
},
}

View 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,
},
}