what do these even do?
This commit is contained in:
parent
8454402a11
commit
365868d772
@ -21,7 +21,7 @@ cmd open ${{
|
||||
case $(file --mime-type "$(readlink -f $f)" -b) in
|
||||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) localc $fx ;;
|
||||
image/vnd.djvu|application/pdf|application/postscript) setsid -f zathura $fx >/dev/null 2>&1 ;;
|
||||
text/*|application/json|inode/x-empty|application/x-subrip) $EDITOR $fx;;
|
||||
text/*|application/json|inode/x-empty|application/x-subrip|application/javascript) $EDITOR $fx;;
|
||||
image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;;
|
||||
image/svg+xml) display -- $f ;;
|
||||
image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|avif\|tif\|ico\)\(_large\)*$" |
|
||||
|
||||
@ -35,6 +35,7 @@ vim.keymap.set("i", "<C-s>", "<ESC>:w<CR>", opts)
|
||||
-- Switch between buffers
|
||||
vim.keymap.set("n", "<S-l>", ":bnext<CR>", opts)
|
||||
vim.keymap.set("n", "<S-h>", ":bprevious<CR>", opts)
|
||||
vim.keymap.set("n", "<leader>bd", ":bd<CR>", opts)
|
||||
|
||||
-- center after up and down movements
|
||||
vim.keymap.set("n", "<C-u>", "<C-u>zz", opts)
|
||||
|
||||
@ -47,8 +47,6 @@ local options = {
|
||||
|
||||
vim.opt.fillchars = vim.opt.fillchars + "eob: "
|
||||
|
||||
vim.opt.shortmess:append("c")
|
||||
|
||||
for k, v in pairs(options) do
|
||||
vim.opt[k] = v
|
||||
end
|
||||
|
||||
@ -37,13 +37,6 @@ return {
|
||||
},
|
||||
})
|
||||
end,
|
||||
anthropic = function()
|
||||
return require("codecompanion.adapters").extend("anthropic", {
|
||||
env = {
|
||||
api_key = "cmd:cat $HOME/.config/anthropic/KEY",
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@ -179,6 +179,7 @@ return {
|
||||
-- formatting
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
enabled = true,
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
@ -227,7 +228,7 @@ return {
|
||||
-- language specific tooling
|
||||
{
|
||||
"simrat39/rust-tools.nvim",
|
||||
enabled = true,
|
||||
enabled = false,
|
||||
opts = {
|
||||
server = {
|
||||
on_attach = function(_, bufnr)
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
return {
|
||||
-- 'stevearc/oil.nvim',
|
||||
-- enabled = true,
|
||||
-- lazy = false,
|
||||
-- opts = {
|
||||
-- default_file_explorer = true,
|
||||
-- },
|
||||
-- dependencies = { { "echasnovski/mini.icons", opts = {} } },
|
||||
'stevearc/oil.nvim',
|
||||
enabled = false,
|
||||
|
||||
lazy = false,
|
||||
opts = {
|
||||
default_file_explorer = true,
|
||||
},
|
||||
dependencies = { { "echasnovski/mini.icons", opts = {} } },
|
||||
}
|
||||
|
||||
@ -1,21 +1,21 @@
|
||||
return {
|
||||
-- {
|
||||
-- "L3MON4D3/LuaSnip",
|
||||
-- enabled = true,
|
||||
-- dependencies = {
|
||||
-- "rafamadriz/friendly-snippets",
|
||||
-- config = function()
|
||||
-- require("luasnip.loaders.from_vscode").lazy_load()
|
||||
-- end,
|
||||
-- },
|
||||
-- opts = {
|
||||
-- history = true,
|
||||
-- delete_check_events = "TextChanged",
|
||||
-- },
|
||||
-- -- stylua: ignore
|
||||
-- keys = {
|
||||
-- { "<tab>", function() require("luasnip").jump(1) end, mode = "s", },
|
||||
-- { "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" }, },
|
||||
-- },
|
||||
-- },
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
enabled = false,
|
||||
dependencies = {
|
||||
"rafamadriz/friendly-snippets",
|
||||
config = function()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
end,
|
||||
},
|
||||
opts = {
|
||||
history = true,
|
||||
delete_check_events = "TextChanged",
|
||||
},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<tab>", function() require("luasnip").jump(1) end, mode = "s", },
|
||||
{ "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" }, },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@ return {
|
||||
},
|
||||
{
|
||||
"RRethy/vim-illuminate",
|
||||
enabled = true,
|
||||
enabled = false,
|
||||
event = "BufReadPost",
|
||||
config = function()
|
||||
require("illuminate").configure({ delay = 200 })
|
||||
@ -54,7 +54,7 @@ return {
|
||||
},
|
||||
{
|
||||
"echasnovski/mini.bufremove",
|
||||
enabled = true,
|
||||
enabled = false,
|
||||
event = "VeryLazy",
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
@ -102,15 +102,15 @@ return {
|
||||
},
|
||||
{
|
||||
"MunifTanjim/nui.nvim",
|
||||
enabled = true,
|
||||
enabled = false,
|
||||
},
|
||||
{
|
||||
"kyazdani42/nvim-web-devicons",
|
||||
enabled = true,
|
||||
enabled = false,
|
||||
},
|
||||
{
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
enabled = true,
|
||||
enabled = false,
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
@ -127,7 +127,7 @@ return {
|
||||
},
|
||||
{
|
||||
"preservim/vim-markdown",
|
||||
enabled = true,
|
||||
enabled = false,
|
||||
},
|
||||
{
|
||||
"nacro90/numb.nvim",
|
||||
@ -142,11 +142,11 @@ return {
|
||||
},
|
||||
{
|
||||
"junegunn/vim-slash",
|
||||
enabled = true,
|
||||
enabled = false,
|
||||
},
|
||||
{
|
||||
"echasnovski/mini.surround",
|
||||
enabled = true,
|
||||
enabled = false,
|
||||
keys = { "gz" },
|
||||
opts = {
|
||||
mappings = {
|
||||
@ -166,7 +166,7 @@ return {
|
||||
},
|
||||
{
|
||||
"danymat/neogen",
|
||||
enabled = true,
|
||||
enabled = false,
|
||||
event = "BufEnter",
|
||||
config = function()
|
||||
require("neogen").setup({
|
||||
|
||||
@ -1,33 +1,33 @@
|
||||
return {
|
||||
-- {
|
||||
-- "mickael-menu/zk-nvim",
|
||||
-- enabled = true,
|
||||
-- event = "VeryLazy",
|
||||
-- opts = {
|
||||
-- picker = "telescope",
|
||||
-- },
|
||||
-- config = function(_, opts)
|
||||
-- require("zk").setup(opts)
|
||||
--
|
||||
-- local function yankName(options, picker_options)
|
||||
-- require("zk").pick_notes(options, picker_options, function(notes)
|
||||
-- local pos = vim.api.nvim_win_get_cursor(0)[2]
|
||||
-- local line = vim.api.nvim_get_current_line()
|
||||
--
|
||||
-- if picker_options.multi_select == false then
|
||||
-- notes = { notes }
|
||||
-- end
|
||||
-- for _, note in ipairs(notes) do
|
||||
-- -- stylua: ignore
|
||||
-- local nline = line:sub(0, pos) .. note.title .. " - " .. note.path .. line:sub(pos + 1)
|
||||
-- vim.api.nvim_set_current_line(nline)
|
||||
-- end
|
||||
-- end)
|
||||
-- end
|
||||
--
|
||||
-- require("zk.commands").add("ZkInsertLink", function(options)
|
||||
-- yankName(options, { title = "Zk Yank" })
|
||||
-- end)
|
||||
-- end,
|
||||
-- },
|
||||
{
|
||||
"mickael-menu/zk-nvim",
|
||||
enabled = false,
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
picker = "telescope",
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("zk").setup(opts)
|
||||
|
||||
local function yankName(options, picker_options)
|
||||
require("zk").pick_notes(options, picker_options, function(notes)
|
||||
local pos = vim.api.nvim_win_get_cursor(0)[2]
|
||||
local line = vim.api.nvim_get_current_line()
|
||||
|
||||
if picker_options.multi_select == false then
|
||||
notes = { notes }
|
||||
end
|
||||
for _, note in ipairs(notes) do
|
||||
-- stylua: ignore
|
||||
local nline = line:sub(0, pos) .. note.title .. " - " .. note.path .. line:sub(pos + 1)
|
||||
vim.api.nvim_set_current_line(nline)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
require("zk.commands").add("ZkInsertLink", function(options)
|
||||
yankName(options, { title = "Zk Yank" })
|
||||
end)
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@ -158,10 +158,10 @@ end
|
||||
function M.exists(path)
|
||||
local exists = vim.fn.filereadable(vim.fn.expand(path))
|
||||
if exists == 1 then
|
||||
vim.notify(path .. " exists", vim.log.levels.INFO)
|
||||
-- vim.notify(path .. " exists", vim.log.levels.INFO)
|
||||
return true
|
||||
else
|
||||
vim.notify(path .. " doesn't exist", vim.log.levels.INFO)
|
||||
-- vim.notify(path .. " doesn't exist", vim.log.levels.INFO)
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user