add nvim-tree
This commit is contained in:
@@ -27,6 +27,8 @@
|
|||||||
"nvim-highlight-colors": { "branch": "main", "commit": "b42a5ccec7457b44e89f7ed3b3afb1b375bb2093" },
|
"nvim-highlight-colors": { "branch": "main", "commit": "b42a5ccec7457b44e89f7ed3b3afb1b375bb2093" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "61fdd3a8609071ce44519e405f3424d84ec94d9d" },
|
"nvim-lspconfig": { "branch": "master", "commit": "61fdd3a8609071ce44519e405f3424d84ec94d9d" },
|
||||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||||
|
"nvim-tree.lua": { "branch": "master", "commit": "64e2192f5250796aa4a7f33c6ad888515af50640" },
|
||||||
|
"nvim-tree.lua-float-preview": { "branch": "master", "commit": "78b3ff2e0423438a341c9628f2f10f51b80a69c6" },
|
||||||
"nvim-treesitter": { "branch": "main", "commit": "32cb9f9b9db71b0dc2454817727cd9a5d840658c" },
|
"nvim-treesitter": { "branch": "main", "commit": "32cb9f9b9db71b0dc2454817727cd9a5d840658c" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "c2599a81ecabaae07c49ff9b45dcd032a8d90f1a" },
|
"nvim-web-devicons": { "branch": "master", "commit": "c2599a81ecabaae07c49ff9b45dcd032a8d90f1a" },
|
||||||
"peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" },
|
"peek.nvim": { "branch": "master", "commit": "5820d937d5414baea5f586dc2a3d912a74636e5b" },
|
||||||
|
|||||||
@@ -27,9 +27,10 @@ return {
|
|||||||
cmd = { vim.fn.stdpath("config") .. "/shell/clangd-direnv.sh" }
|
cmd = { vim.fn.stdpath("config") .. "/shell/clangd-direnv.sh" }
|
||||||
})
|
})
|
||||||
|
|
||||||
lspconfig['hls'].setup({
|
lspconfig.hls.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
cmd = { "haskell-language-server-wrapper" },
|
filetypes = { 'haskell', 'lhaskell' },
|
||||||
|
cmd = { "haskell-language-server-wrapper", "--lsp" },
|
||||||
settings = {
|
settings = {
|
||||||
haskell = {
|
haskell = {
|
||||||
formattingProvider = "fourmolu"
|
formattingProvider = "fourmolu"
|
||||||
|
|||||||
61
lua/plugins/nvim-tree.lua
Normal file
61
lua/plugins/nvim-tree.lua
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
return {
|
||||||
|
"nvim-tree/nvim-tree.lua",
|
||||||
|
dependencies = {
|
||||||
|
{
|
||||||
|
"JMarkin/nvim-tree.lua-float-preview",
|
||||||
|
lazy = true,
|
||||||
|
-- default
|
||||||
|
opts = {
|
||||||
|
-- Whether the float preview is enabled by default. When set to false, it has to be "toggled" on.
|
||||||
|
toggled_on = true,
|
||||||
|
-- wrap nvimtree commands
|
||||||
|
wrap_nvimtree_commands = true,
|
||||||
|
-- lines for scroll
|
||||||
|
scroll_lines = 20,
|
||||||
|
-- window config
|
||||||
|
window = {
|
||||||
|
style = "minimal",
|
||||||
|
relative = "win",
|
||||||
|
border = "rounded",
|
||||||
|
wrap = false,
|
||||||
|
},
|
||||||
|
mapping = {
|
||||||
|
-- scroll down float buffer
|
||||||
|
down = { "<C-d>" },
|
||||||
|
-- scroll up float buffer
|
||||||
|
up = { "<C-e>", "<C-u>" },
|
||||||
|
-- enable/disable float windows
|
||||||
|
toggle = { "<C-x>" },
|
||||||
|
},
|
||||||
|
-- hooks if return false preview doesn't shown
|
||||||
|
hooks = {
|
||||||
|
pre_open = function(path)
|
||||||
|
-- if file > 5 MB or not text -> not preview
|
||||||
|
local size = require("float-preview.utils").get_size(path)
|
||||||
|
if type(size) ~= "number" then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
local is_text = require("float-preview.utils").is_text(path)
|
||||||
|
return size < 5 and is_text
|
||||||
|
end,
|
||||||
|
post_open = function(bufnr)
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require('nvim-tree').setup {
|
||||||
|
renderer = {
|
||||||
|
group_empty = true,
|
||||||
|
},
|
||||||
|
filters = {
|
||||||
|
dotfiles = false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
keys = {
|
||||||
|
{ ";", function() require("nvim-tree.api").tree.toggle({ focus = true }) end, desc = "Toggle nvim tree" }
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,44 +1,45 @@
|
|||||||
---@type LazySpec
|
return {}
|
||||||
return {
|
-- ---@type LazySpec
|
||||||
"mikavilpas/yazi.nvim",
|
-- return {
|
||||||
version = "*", -- use the latest stable version
|
-- "mikavilpas/yazi.nvim",
|
||||||
event = "VeryLazy",
|
-- version = "*", -- use the latest stable version
|
||||||
dependencies = {
|
-- event = "VeryLazy",
|
||||||
{ "nvim-lua/plenary.nvim", lazy = true },
|
-- dependencies = {
|
||||||
},
|
-- { "nvim-lua/plenary.nvim", lazy = true },
|
||||||
keys = {
|
-- },
|
||||||
-- 👇 in this section, choose your own keymappings!
|
-- keys = {
|
||||||
{
|
-- -- 👇 in this section, choose your own keymappings!
|
||||||
"<leader>-",
|
-- {
|
||||||
mode = { "n", "v" },
|
-- "<leader>-",
|
||||||
"<cmd>Yazi<cr>",
|
-- mode = { "n", "v" },
|
||||||
desc = "Open yazi at the current file",
|
-- "<cmd>Yazi<cr>",
|
||||||
},
|
-- desc = "Open yazi at the current file",
|
||||||
{
|
-- },
|
||||||
-- Open in the current working directory
|
-- {
|
||||||
"<leader>cw",
|
-- -- Open in the current working directory
|
||||||
"<cmd>Yazi cwd<cr>",
|
-- "<leader>cw",
|
||||||
desc = "Open the file manager in nvim's working directory",
|
-- "<cmd>Yazi cwd<cr>",
|
||||||
},
|
-- desc = "Open the file manager in nvim's working directory",
|
||||||
{
|
-- },
|
||||||
";",
|
-- {
|
||||||
"<cmd>Yazi toggle<cr>",
|
-- ";",
|
||||||
desc = "Resume the last yazi session",
|
-- "<cmd>Yazi toggle<cr>",
|
||||||
},
|
-- desc = "Resume the last yazi session",
|
||||||
},
|
-- },
|
||||||
---@type YaziConfig | {}
|
-- },
|
||||||
opts = {
|
-- ---@type YaziConfig | {}
|
||||||
-- if you want to open yazi instead of netrw, see below for more info
|
-- opts = {
|
||||||
open_for_directories = false,
|
-- -- if you want to open yazi instead of netrw, see below for more info
|
||||||
keymaps = {
|
-- open_for_directories = false,
|
||||||
show_help = "<f1>",
|
-- keymaps = {
|
||||||
},
|
-- show_help = "<f1>",
|
||||||
},
|
-- },
|
||||||
-- 👇 if you use `open_for_directories=true`, this is recommended
|
-- },
|
||||||
init = function()
|
-- -- 👇 if you use `open_for_directories=true`, this is recommended
|
||||||
-- mark netrw as loaded so it's not loaded at all.
|
-- init = function()
|
||||||
--
|
-- -- mark netrw as loaded so it's not loaded at all.
|
||||||
-- More details: https://github.com/mikavilpas/yazi.nvim/issues/802
|
-- --
|
||||||
vim.g.loaded_netrwPlugin = 1
|
-- -- More details: https://github.com/mikavilpas/yazi.nvim/issues/802
|
||||||
end,
|
-- vim.g.loaded_netrwPlugin = 1
|
||||||
}
|
-- end,
|
||||||
|
-- }
|
||||||
|
|||||||
Reference in New Issue
Block a user