feat: move :Reveal to a plugin
This commit is contained in:
parent
c93c7bb1de
commit
009941b07d
6
init.lua
6
init.lua
|
@ -201,7 +201,11 @@ require('lazy').setup({
|
|||
--
|
||||
-- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins
|
||||
{ import = 'custom.plugins' },
|
||||
}, {})
|
||||
}, {
|
||||
dev = {
|
||||
path = "~/repos",
|
||||
}
|
||||
})
|
||||
|
||||
-- [[ Setting options ]]
|
||||
-- See `:help vim.o`
|
||||
|
|
|
@ -71,7 +71,7 @@ return {
|
|||
|
||||
{
|
||||
"kristijanhusak/vim-dirvish-git",
|
||||
dependencies = { "justinmk/vim-dirvish", },
|
||||
dependencies = { "justinmk/vim-dirvish" },
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -103,24 +103,35 @@ return {
|
|||
|
||||
{
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
-- cond = false,
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
-- @see: https://github.com/jay-babu/mason-null-ls.nvim
|
||||
-- might want to just use mason-null-ls. not yet sure what the advantage is.
|
||||
local null_ls = require("null-ls")
|
||||
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.code_actions.eslint_d,
|
||||
null_ls.builtins.diagnostics.codespell,
|
||||
-- null_ls.builtins.diagnostics.cspell,
|
||||
-- null_ls.builtins.diagnostics.editorconfig_checker,
|
||||
null_ls.builtins.diagnostics.eslint_d,
|
||||
null_ls.builtins.formatting.lua_format,
|
||||
-- null_ls.builtins.formatting.prettier_eslint,
|
||||
null_ls.builtins.formatting.prettierd,
|
||||
},
|
||||
})
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
"jay-babu/mason-null-ls.nvim",
|
||||
cond = false,
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("mason-null-ls").setup({
|
||||
ensure_installed = {},
|
||||
automatic_installation = true,
|
||||
automatic_setup = false,
|
||||
})
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,21 +1,9 @@
|
|||
vim.api.nvim_create_user_command('Reveal',
|
||||
function()
|
||||
-- local sysname = vim.loop.os_uname().sysname
|
||||
|
||||
local currentBuffer = vim.api.nvim_get_current_buf()
|
||||
local bufName = vim.api.nvim_buf_get_name(currentBuffer)
|
||||
local ftype = vim.fn.getftype(bufName)
|
||||
|
||||
if ftype == "dir" then
|
||||
os.execute("xdg-open " .. bufName)
|
||||
else
|
||||
os.execute("xdg-open " .. vim.fn.expand("%:p:h"))
|
||||
end
|
||||
end,
|
||||
{}
|
||||
)
|
||||
|
||||
vim.keymap.set('n', '<leader>R', ":Reveal<CR>", { noremap = true, desc = '[R]eveal with xdg-open' })
|
||||
|
||||
return {
|
||||
{
|
||||
"killtheliterate/nvim-reveal",
|
||||
dev = false,
|
||||
config = function()
|
||||
require('nvim-reveal').setup {}
|
||||
end
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue