chore(nvim): obsidian, oil, markdown, fzf-lua, lsp visual code actions
This commit is contained in:
parent
64ccf8befe
commit
03622a3c5c
6 changed files with 117 additions and 22 deletions
|
@ -18,8 +18,64 @@ return {
|
|||
},
|
||||
{
|
||||
"stevearc/oil.nvim",
|
||||
opts = {},
|
||||
config = function()
|
||||
require("oil").setup({
|
||||
float = {
|
||||
preview_split = "right"
|
||||
},
|
||||
})
|
||||
-- Function to open oil.nvim in a vertical split
|
||||
local function open_oil_split()
|
||||
-- Calculate the width for the split (20% of the total width)
|
||||
local width = math.floor(vim.o.columns * 0.2) -- 20% of total width
|
||||
-- Create a vertical split and set width
|
||||
vim.cmd("vsplit") -- Create a vertical split
|
||||
vim.cmd(string.format("vertical resize %d", width)) -- Resize to 20%
|
||||
-- Open oil in the new split
|
||||
require("oil").open() -- Use open() to open oil.nvim
|
||||
end
|
||||
|
||||
-- Key mapping to open oil in a vertical split
|
||||
vim.api.nvim_set_keymap('n', '<leader>o', ':lua require("oil").open_float()<CR>', { noremap = true, silent = true })
|
||||
vim.keymap.set('n', '<leader>O', open_oil_split, { noremap = true, silent = true })
|
||||
|
||||
end
|
||||
},
|
||||
-- {
|
||||
-- 'echasnovski/mini.files',
|
||||
-- version = false,
|
||||
-- opts = {
|
||||
-- mappings = {
|
||||
-- close = 'q',
|
||||
-- go_in = '',
|
||||
-- go_in_plus = 'l',
|
||||
-- go_out = '<CR>',
|
||||
-- go_out_plus = 'h',
|
||||
-- reset = '<BS>',
|
||||
-- show_help = 'g?',
|
||||
-- synchronize = 's',
|
||||
-- },
|
||||
-- options = {
|
||||
-- permanent_delete = false
|
||||
-- }
|
||||
-- },
|
||||
-- keys = {
|
||||
-- {
|
||||
-- "<leader>o",
|
||||
-- function()
|
||||
-- require("mini.files").open(vim.api.nvim_buf_get_name(0), true)
|
||||
-- end,
|
||||
-- desc = "Open mini.files (Directory of the current file)"
|
||||
-- },
|
||||
-- {
|
||||
-- "<leader>O",
|
||||
-- function()
|
||||
-- require("mini.files").open(vim.uv.cwd(), true)
|
||||
-- end,
|
||||
-- desc = "Open mini.files (cwd)"
|
||||
-- }
|
||||
-- }
|
||||
-- },
|
||||
{
|
||||
'mrjones2014/smart-splits.nvim',
|
||||
config = function()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue