add few improvements
This commit is contained in:
parent
3e497bafff
commit
1ae8016d5b
6 changed files with 231 additions and 24 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
"cellular-automaton.nvim": { "branch": "main", "commit": "b7d056dab963b5d3f2c560d92937cb51db61cb5b" },
|
"cellular-automaton.nvim": { "branch": "main", "commit": "b7d056dab963b5d3f2c560d92937cb51db61cb5b" },
|
||||||
"cloak.nvim": { "branch": "main", "commit": "951b163e55ce7639eb320c450bde9283c4fe968b" },
|
"cloak.nvim": { "branch": "main", "commit": "951b163e55ce7639eb320c450bde9283c4fe968b" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
||||||
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||||
|
|
@ -12,9 +12,10 @@
|
||||||
"distant.nvim": { "branch": "v0.3", "commit": "998724f62386c8022a4e6c885f4509cf9477451a" },
|
"distant.nvim": { "branch": "v0.3", "commit": "998724f62386c8022a4e6c885f4509cf9477451a" },
|
||||||
"focus.nvim": { "branch": "master", "commit": "c83be53de558f6f0824c8cefcad61719c87ce157" },
|
"focus.nvim": { "branch": "master", "commit": "c83be53de558f6f0824c8cefcad61719c87ce157" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" },
|
"friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "87640f5a877b18bdd49884dbcac220fed924b867" },
|
"gitsigns.nvim": { "branch": "main", "commit": "017c924e20e52096796fe8bb89b9718acb5a067c" },
|
||||||
"glow.nvim": { "branch": "main", "commit": "5b38fb7b6e806cac62707a4aba8c10c5f14d5bb5" },
|
"glow.nvim": { "branch": "main", "commit": "5b38fb7b6e806cac62707a4aba8c10c5f14d5bb5" },
|
||||||
"harpoon": { "branch": "master", "commit": "867e212ac153e793f95b316d1731f3ca1894625e" },
|
"harpoon": { "branch": "master", "commit": "867e212ac153e793f95b316d1731f3ca1894625e" },
|
||||||
|
"image.nvim": { "branch": "master", "commit": "41f0f2643a09631bc0d8e2837b514667d423e440" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "7206c77cb931f79885fc47f88ae18f99148392eb" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "7206c77cb931f79885fc47f88ae18f99148392eb" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
|
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
|
||||||
"lsp-zero.nvim": { "branch": "v2.x", "commit": "ffebf6f7b0649f1eb81b37c37b75552f8ff96337" },
|
"lsp-zero.nvim": { "branch": "v2.x", "commit": "ffebf6f7b0649f1eb81b37c37b75552f8ff96337" },
|
||||||
|
|
@ -27,22 +28,24 @@
|
||||||
"mini.bufremove": { "branch": "main", "commit": "f53c7f27e36009fe61563c11cde154b94a0e5b94" },
|
"mini.bufremove": { "branch": "main", "commit": "f53c7f27e36009fe61563c11cde154b94a0e5b94" },
|
||||||
"mini.comment": { "branch": "main", "commit": "3d9c8009615857e982f09bc5357fc95f2a2175f3" },
|
"mini.comment": { "branch": "main", "commit": "3d9c8009615857e982f09bc5357fc95f2a2175f3" },
|
||||||
"nabla.nvim": { "branch": "master", "commit": "f5aff14fa3d60f4be568c444be84400812823648" },
|
"nabla.nvim": { "branch": "master", "commit": "f5aff14fa3d60f4be568c444be84400812823648" },
|
||||||
|
"neo-tree.nvim": { "branch": "v3.x", "commit": "230ff118613fa07138ba579b89d13ec2201530b9" },
|
||||||
"neoconf.nvim": { "branch": "main", "commit": "64437787dba70fce50dad7bfbb97d184c5bc340f" },
|
"neoconf.nvim": { "branch": "main", "commit": "64437787dba70fce50dad7bfbb97d184c5bc340f" },
|
||||||
"neodev.nvim": { "branch": "main", "commit": "c4ce017bd4bacf60bf59330cec9e93c5d5e104a6" },
|
"neodev.nvim": { "branch": "main", "commit": "c4ce017bd4bacf60bf59330cec9e93c5d5e104a6" },
|
||||||
"neorg": { "branch": "main", "commit": "baaf13a3145534144b795ad37db22bfffd2ad343" },
|
"neorg": { "branch": "main", "commit": "baaf13a3145534144b795ad37db22bfffd2ad343" },
|
||||||
"neorg-telescope": { "branch": "main", "commit": "6a7a677c40fa3c348924a4e2a06a513e0b34c056" },
|
"neorg-telescope": { "branch": "main", "commit": "6a7a677c40fa3c348924a4e2a06a513e0b34c056" },
|
||||||
|
"nui.nvim": { "branch": "main", "commit": "c9b4de623d19a85b353ff70d2ae9c77143abe69c" },
|
||||||
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
|
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
|
||||||
"nvim-bqf": { "branch": "main", "commit": "bdc2a4e5bb670b3c0e33ada9c0eec636d93a0748" },
|
"nvim-bqf": { "branch": "main", "commit": "bdc2a4e5bb670b3c0e33ada9c0eec636d93a0748" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" },
|
"nvim-cmp": { "branch": "main", "commit": "41d7633e4146dce1072de32cea31ee31b056a131" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "511609ae0311abfcfaed3c398429a147e895ce2c" },
|
"nvim-lspconfig": { "branch": "master", "commit": "bd405e45c5fb122c16af8f87fa2dd7ab1981b243" },
|
||||||
"nvim-spectre": { "branch": "master", "commit": "a18a58015b46f02b4fe537ebfffd82e46110ff24" },
|
"nvim-spectre": { "branch": "master", "commit": "a18a58015b46f02b4fe537ebfffd82e46110ff24" },
|
||||||
"nvim-surround": { "branch": "main", "commit": "703ec63aa798e5e07d309b35e42def34bebe0174" },
|
"nvim-surround": { "branch": "main", "commit": "703ec63aa798e5e07d309b35e42def34bebe0174" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "180e1ca385442e35e1d18420221a148c5e045671" },
|
"nvim-treesitter": { "branch": "master", "commit": "b6b9ca448b7f236e2e60f8393a729902511f9db9" },
|
||||||
"nvim-treesitter-context": { "branch": "master", "commit": "cfa8ee19ac9bae9b7fb2958eabe2b45b70c56ccb" },
|
"nvim-treesitter-context": { "branch": "master", "commit": "cfa8ee19ac9bae9b7fb2958eabe2b45b70c56ccb" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" },
|
||||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1277b4a1f451b0f18c0790e1a7f12e1e5fdebfee" },
|
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1277b4a1f451b0f18c0790e1a7f12e1e5fdebfee" },
|
||||||
"nvim-ufo": { "branch": "main", "commit": "9fa77fb7e4365a053a5303b773aaf5eaf806d1f4" },
|
"nvim-ufo": { "branch": "main", "commit": "9fa77fb7e4365a053a5303b773aaf5eaf806d1f4" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "5efb8bd06841f91f97c90e16de85e96d57e9c862" },
|
"nvim-web-devicons": { "branch": "master", "commit": "8b2e5ef9eb8a717221bd96cb8422686d65a09ed5" },
|
||||||
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
|
"plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" },
|
||||||
"promise-async": { "branch": "main", "commit": "94f6f03c6c1e2aab551aacdf0c1e597a7269abb6" },
|
"promise-async": { "branch": "main", "commit": "94f6f03c6c1e2aab551aacdf0c1e597a7269abb6" },
|
||||||
|
|
@ -54,6 +57,7 @@
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "6213322ab56eb27356fdc09a5078e41e3ea7f3bc" },
|
"telescope.nvim": { "branch": "master", "commit": "6213322ab56eb27356fdc09a5078e41e3ea7f3bc" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" },
|
"todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" },
|
||||||
|
"tree-sitter-just": { "branch": "main", "commit": "4e5f5f3ff37b12a1bbf664eb3966b3019e924594" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
|
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
|
||||||
"undotree": { "branch": "master", "commit": "36ff7abb6b60980338344982ad4cdf03f7961ecd" },
|
"undotree": { "branch": "master", "commit": "36ff7abb6b60980338344982ad4cdf03f7961ecd" },
|
||||||
"venn.nvim": { "branch": "main", "commit": "e4d68341a73dd56c64955058821a58295fb337b1" },
|
"venn.nvim": { "branch": "main", "commit": "e4d68341a73dd56c64955058821a58295fb337b1" },
|
||||||
|
|
|
||||||
|
|
@ -103,3 +103,9 @@ autocmd({ "BufWritePre" }, {
|
||||||
-- vim.api.nvim_win_set_option(0, "wrap", should_wrap)
|
-- vim.api.nvim_win_set_option(0, "wrap", should_wrap)
|
||||||
-- end,
|
-- end,
|
||||||
-- })
|
-- })
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "VimLeave" }, {
|
||||||
|
callback = function()
|
||||||
|
vim.fn.jobstart('notify-send "hello"', { detach = true })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,12 @@ function M.setup()
|
||||||
vim.bo.shiftwidth = 4
|
vim.bo.shiftwidth = 4
|
||||||
vim.bo.expandtab = false
|
vim.bo.expandtab = false
|
||||||
vim.opt_local.wrap = true
|
vim.opt_local.wrap = true
|
||||||
|
-- disable indentation
|
||||||
|
vim.opt_local.autoindent = false
|
||||||
|
vim.opt_local.smartindent = false
|
||||||
|
vim.opt_local.cindent = false
|
||||||
|
vim.opt_local.indentexpr = ""
|
||||||
|
vim.opt_local.paste = true
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ require("lazy").setup({
|
||||||
"gzip",
|
"gzip",
|
||||||
-- "matchit",
|
-- "matchit",
|
||||||
-- "matchparen",
|
-- "matchparen",
|
||||||
-- "netrwPlugin",
|
"netrwPlugin",
|
||||||
"tarPlugin",
|
"tarPlugin",
|
||||||
"tohtml",
|
"tohtml",
|
||||||
"tutor",
|
"tutor",
|
||||||
|
|
|
||||||
|
|
@ -166,6 +166,14 @@ return {
|
||||||
load_textobjects = true
|
load_textobjects = true
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"IndianBoy42/tree-sitter-just",
|
||||||
|
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||||
|
config = function(_, opts)
|
||||||
|
require("tree-sitter-just").setup({})
|
||||||
|
end,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
|
|
@ -256,6 +264,7 @@ return {
|
||||||
{ "<bs>", desc = "Decrement selection", mode = "x" },
|
{ "<bs>", desc = "Decrement selection", mode = "x" },
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
|
require("nvim-treesitter.install").compilers = { "gcc", "clang" }
|
||||||
if type(opts.ensure_installed) == "table" then
|
if type(opts.ensure_installed) == "table" then
|
||||||
---@type table<string, boolean>
|
---@type table<string, boolean>
|
||||||
local added = {}
|
local added = {}
|
||||||
|
|
@ -317,6 +326,146 @@ return {
|
||||||
-- File Management
|
-- File Management
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
|
{
|
||||||
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
branch = "v3.x",
|
||||||
|
cmd = "Neotree",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
"3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
sources = { "filesystem", "buffers", "git_status", "document_symbols" },
|
||||||
|
open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" },
|
||||||
|
filesystem = {
|
||||||
|
bind_to_cwd = false,
|
||||||
|
follow_current_file = { enabled = true },
|
||||||
|
use_libuv_file_watcher = true,
|
||||||
|
hijack_netrw_behavior = "open_current",
|
||||||
|
},
|
||||||
|
window = {
|
||||||
|
mappings = {
|
||||||
|
["<space>"] = "none",
|
||||||
|
-- ["C"] = "copy",
|
||||||
|
["C"] = {
|
||||||
|
"copy",
|
||||||
|
config = {
|
||||||
|
show_path = "absolute", -- "none", "relative", "absolute"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
["R"] = "rename",
|
||||||
|
["y"] = function(state)
|
||||||
|
local node = state.tree:get_node()
|
||||||
|
local filename = node.name
|
||||||
|
vim.fn.setreg("+", filename)
|
||||||
|
vim.notify("Copied: " .. filename)
|
||||||
|
end,
|
||||||
|
["Y"] = function(state)
|
||||||
|
local node = state.tree:get_node()
|
||||||
|
local filepath = node:get_id()
|
||||||
|
vim.fn.setreg("+", filepath)
|
||||||
|
vim.notify("Copied: " .. filepath)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
default_component_configs = {
|
||||||
|
indent = {
|
||||||
|
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
|
||||||
|
expander_collapsed = "",
|
||||||
|
expander_expanded = "",
|
||||||
|
expander_highlight = "NeoTreeExpander",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>E",
|
||||||
|
function()
|
||||||
|
vim.cmd("Neotree toggle position=current")
|
||||||
|
end,
|
||||||
|
desc = "Toggle NeoTree as Buffer",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>e",
|
||||||
|
function()
|
||||||
|
vim.cmd("Neotree toggle")
|
||||||
|
end,
|
||||||
|
desc = "Toggle NeoTree",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
deactivate = function()
|
||||||
|
vim.cmd([[Neotree close]])
|
||||||
|
end,
|
||||||
|
init = function()
|
||||||
|
if vim.fn.argc(-1) == 1 then
|
||||||
|
local stat = vim.loop.fs_stat(vim.fn.argv(0))
|
||||||
|
if stat and stat.type == "directory" then
|
||||||
|
require("neo-tree")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
config = function(_, opts)
|
||||||
|
local function on_move(data)
|
||||||
|
Util.lsp.on_rename(data.source, data.destination)
|
||||||
|
end
|
||||||
|
|
||||||
|
local events = require("neo-tree.events")
|
||||||
|
opts.event_handlers = opts.event_handlers or {}
|
||||||
|
vim.list_extend(opts.event_handlers, {
|
||||||
|
{ event = events.FILE_MOVED, handler = on_move },
|
||||||
|
{ event = events.FILE_RENAMED, handler = on_move },
|
||||||
|
})
|
||||||
|
require("neo-tree").setup(opts)
|
||||||
|
vim.api.nvim_create_autocmd("TermClose", {
|
||||||
|
pattern = "*lazygit",
|
||||||
|
callback = function()
|
||||||
|
if package.loaded["neo-tree.sources.git_status"] then
|
||||||
|
require("neo-tree.sources.git_status").refresh()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- {
|
||||||
|
-- "X3eRo0/dired.nvim",
|
||||||
|
-- dependencies = { "MunifTanjim/nui.nvim" },
|
||||||
|
-- opts = {
|
||||||
|
-- path_separator = "/", -- Use '/' as the path separator
|
||||||
|
-- show_hidden = true, -- Show hidden files
|
||||||
|
-- show_banner = false, -- Do not show the banner
|
||||||
|
-- hide_details = false, -- Show file details by default
|
||||||
|
-- sort_order = "name", -- Sort files by name by default
|
||||||
|
--
|
||||||
|
-- -- Define keybindings for various 'dired' actions
|
||||||
|
-- keybinds = {
|
||||||
|
-- dired_enter = "<cr>",
|
||||||
|
-- dired_back = "-",
|
||||||
|
-- dired_up = "_",
|
||||||
|
-- dired_rename = "R",
|
||||||
|
-- dired_quit = "q",
|
||||||
|
-- dired_create = "+",
|
||||||
|
-- dired_toggle_colors = "@",
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- keys = {
|
||||||
|
-- { "<leader>e", "<cmd>Dired<cr>", desc = "Dired" },
|
||||||
|
-- },
|
||||||
|
-- config = function(_, opts)
|
||||||
|
-- require("dired").setup(opts)
|
||||||
|
-- vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
-- pattern = "dired",
|
||||||
|
-- callback = function()
|
||||||
|
-- local Util = require("rayandrew.util")
|
||||||
|
-- Util.map("n", "c", "<cmd>DiredCreate<cr>")
|
||||||
|
-- Util.map("n", "g", "<cmd>edit<cr>")
|
||||||
|
-- end,
|
||||||
|
-- })
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
|
|
||||||
-- {
|
-- {
|
||||||
-- "stevearc/oil.nvim",
|
-- "stevearc/oil.nvim",
|
||||||
-- dependencies = { "nvim-tree/nvim-web-devicons" },
|
-- dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
|
@ -1063,7 +1212,8 @@ return {
|
||||||
{
|
{
|
||||||
"laytan/cloak.nvim",
|
"laytan/cloak.nvim",
|
||||||
event = {
|
event = {
|
||||||
"BufEnter .env*",
|
"BufEnter .env",
|
||||||
|
"BufEnter .env.*",
|
||||||
},
|
},
|
||||||
cmd = {
|
cmd = {
|
||||||
"CloakEnable",
|
"CloakEnable",
|
||||||
|
|
@ -1078,7 +1228,8 @@ return {
|
||||||
patterns = {
|
patterns = {
|
||||||
{
|
{
|
||||||
file_pattern = {
|
file_pattern = {
|
||||||
".env*",
|
".env",
|
||||||
|
".env.*",
|
||||||
".dev.vars",
|
".dev.vars",
|
||||||
},
|
},
|
||||||
cloak_pattern = "=.+",
|
cloak_pattern = "=.+",
|
||||||
|
|
@ -1160,18 +1311,8 @@ return {
|
||||||
-- vim.g.copilot_assume_mapped = true
|
-- vim.g.copilot_assume_mapped = true
|
||||||
-- vim.g.copilot_tab_fallback = ""
|
-- vim.g.copilot_tab_fallback = ""
|
||||||
vim.g.copilot_filetypes = {
|
vim.g.copilot_filetypes = {
|
||||||
["*"] = false,
|
["*"] = true,
|
||||||
["awk"] = true,
|
["text"] = false,
|
||||||
["lua"] = true,
|
|
||||||
["html"] = true,
|
|
||||||
["javascript"] = true,
|
|
||||||
["typescript"] = true,
|
|
||||||
["rust"] = true,
|
|
||||||
["c"] = true,
|
|
||||||
["c#"] = true,
|
|
||||||
["c++"] = true,
|
|
||||||
["go"] = true,
|
|
||||||
["python"] = true,
|
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
@ -1585,4 +1726,37 @@ return {
|
||||||
require("distant"):setup()
|
require("distant"):setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"3rd/image.nvim",
|
||||||
|
opts = {
|
||||||
|
backend = "kitty",
|
||||||
|
integrations = {
|
||||||
|
markdown = {
|
||||||
|
enabled = true,
|
||||||
|
clear_in_insert_mode = false,
|
||||||
|
download_remote_images = true,
|
||||||
|
only_render_image_at_cursor = false,
|
||||||
|
filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here
|
||||||
|
},
|
||||||
|
neorg = {
|
||||||
|
enabled = true,
|
||||||
|
clear_in_insert_mode = false,
|
||||||
|
download_remote_images = true,
|
||||||
|
only_render_image_at_cursor = false,
|
||||||
|
filetypes = { "norg" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
max_width = nil,
|
||||||
|
max_height = nil,
|
||||||
|
max_width_window_percentage = nil,
|
||||||
|
max_height_window_percentage = 50,
|
||||||
|
window_overlap_clear_enabled = false, -- toggles images when windows are overlapped
|
||||||
|
window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" },
|
||||||
|
editor_only_render_when_focused = false, -- auto show/hide images when the editor gains/looses focus
|
||||||
|
tmux_show_only_in_active_window = false, -- auto show/hide images in the correct Tmux window (needs visual-activity off)
|
||||||
|
hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp" }, -- render image files as images when opened
|
||||||
|
},
|
||||||
|
config = true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -165,9 +165,9 @@ Util.map("t", "<c-_>", "<cmd>close<cr>", { desc = "which_key_ignore" })
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
-- netrw
|
-- netrw
|
||||||
Util.map("n", "<leader>e", function()
|
-- Util.map("n", "<leader>e", function()
|
||||||
vim.cmd("Ex")
|
-- vim.cmd("Ex")
|
||||||
end)
|
-- end)
|
||||||
|
|
||||||
-- remap q to quit buffer in netrw
|
-- remap q to quit buffer in netrw
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
|
@ -175,6 +175,23 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||||
command = "nnoremap <buffer> q <cmd>bd<CR>",
|
command = "nnoremap <buffer> q <cmd>bd<CR>",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- disable ctrl-h and ctrl-l in netrw and change it to TmuxNavigateLeft and TmuxNavigateRight
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = "netrw",
|
||||||
|
command = "nnoremap <buffer> <C-h> <cmd>TmuxNavigateLeft<CR>",
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = "netrw",
|
||||||
|
command = "nnoremap <buffer> <C-l> <cmd>TmuxNavigateRight<CR>",
|
||||||
|
})
|
||||||
|
|
||||||
|
-- change refresh netrw to r
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = "netrw",
|
||||||
|
command = "nnoremap <buffer> r <cmd>edit<CR>",
|
||||||
|
})
|
||||||
|
|
||||||
------------------------------
|
------------------------------
|
||||||
-- Others
|
-- Others
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue