Migrate to chezmoi
Move config files from config to chezmoi Add script to auto install packages with DNF and Cargo
This commit is contained in:
parent
110e0882c6
commit
224c7ed45c
1654 changed files with 470035 additions and 51 deletions
|
|
@ -1,9 +0,0 @@
|
|||
(directive) @function
|
||||
(directive_start) @function
|
||||
(directive_end) @function
|
||||
(comment) @comment
|
||||
((parameter) @include (#set! "priority" 110))
|
||||
((php_only) @include (#set! "priority" 110))
|
||||
((bracket_start) @function (#set! "priority" 120))
|
||||
((bracket_end) @function (#set! "priority" 120))
|
||||
(keyword) @function
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
((php) @injection.content
|
||||
(#set! injection.combined)
|
||||
(#set! injection.language php))
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
-- Loadnoptions before anything
|
||||
require("aleidk.options")
|
||||
|
||||
-- Init PLugins
|
||||
|
||||
-- Install package manager https://github.com/folke/lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Load plugins
|
||||
require("lazy").setup("aleidk.plugins")
|
||||
|
||||
-- Rest of configuratin
|
||||
|
||||
require("aleidk.keymaps")
|
||||
require("aleidk.autocmds")
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
{
|
||||
"ChatGPT.nvim": { "branch": "main", "commit": "aadb607038d53d97be4da368b07355f65ad3f047" },
|
||||
"LuaSnip": { "branch": "master", "commit": "80a8528f084a97b624ae443a6f50ff8074ba486b" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "234822140b265ec4ba3203e3e0be0e0bb826dff5" },
|
||||
"auto-session": { "branch": "main", "commit": "3eb26b949e1b90798e84926848551046e2eb0721" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "357cc8f8eeb64702e6fcf2995e3b9becee99a5d3" },
|
||||
"ccc.nvim": { "branch": "main", "commit": "ec6e23fd2c0bf4ffcf71c1271acdcee6e2c6f49c" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
|
||||
"cmp-git": { "branch": "main", "commit": "f900a4cf117300fdc3ba31d26f8b6223ccd9c574" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"comment-box.nvim": { "branch": "main", "commit": "dd1a48f8d06102e9b87ae1e0069bc365c006979b" },
|
||||
"conform.nvim": { "branch": "master", "commit": "e4ecb6e8ed3163c86d7e647f1dc3d94de77ca687" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "d38c1b5266850f77f75e006bcc26213684e1e141" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "1f2d1206a03bd3add8aedf6251e4534611de577f" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
|
||||
"fzf": { "branch": "master", "commit": "ec208af474fa3eadad5779c3d30db6d2db300932" },
|
||||
"fzf-lua": { "branch": "main", "commit": "6589bdd872385d120a1eb3cb85e5d15d37621c1d" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "5a9a6ac29a7805c4783cda21b80a1e361964b3f2" },
|
||||
"harpoon": { "branch": "master", "commit": "c1aebbad9e3d13f20bedb8f2ce8b3a94e39e424a" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "046e2cf04e08ece927bacbfb87c5b35c0b636546" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "16603c6917435d8446f7357cb61095138a417085" },
|
||||
"lazygit.nvim": { "branch": "main", "commit": "de35012036d43bca03628d40d083f7c02a4cda3f" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "9453e3d6cd2ca45d96e20f343e8f1b927364b630" },
|
||||
"mason.nvim": { "branch": "main", "commit": "cd7835b15f5a4204fc37e0aa739347472121a54c" },
|
||||
"mini.bufremove": { "branch": "main", "commit": "f53c7f27e36009fe61563c11cde154b94a0e5b94" },
|
||||
"mini.clue": { "branch": "main", "commit": "3162debaedf981e96e6db16263fdbcf754f0733b" },
|
||||
"mini.comment": { "branch": "main", "commit": "877acea5b2a32ff55f808fc0ebe9aa898648318c" },
|
||||
"mini.surround": { "branch": "main", "commit": "af8129efcabe95fc08a233e9f91569829bed031f" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "d617d9eb27e73e701e446874c6ea2cb528719260" },
|
||||
"neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" },
|
||||
"neogit": { "branch": "master", "commit": "01dc0a7e237a4d6d053cea2503f5dd1a81c1e310" },
|
||||
"noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" },
|
||||
"nui.nvim": { "branch": "main", "commit": "c0c8e347ceac53030f5c1ece1c5a5b6a17a25b32" },
|
||||
"nvim": { "branch": "main", "commit": "ea52fe8a0b1e4a820df0d0cf9a6a5a0e18c3eaa0" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "096d0baecc34f6c5d8a6dd25851e9d5ad338209b" },
|
||||
"nvim-bqf": { "branch": "main", "commit": "8784eebf34371049b641646d00232c2603215297" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "51260c02a8ffded8e16162dcf41a23ec90cfba62" },
|
||||
"nvim-lint": { "branch": "master", "commit": "962a76877a4479a535b935bd7ef35ad41ba308b2" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "6c797ff9324094e333e2ace9526ca4a62ad9d1ca" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "107e61afb7129d637ea6c3c68b97a22194b0bf16" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "8aa32aa6b84dda357849dbc0f775e69f2e04c041" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "eb208bfdfcf76efea0424747e23e44641e13aaa6" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "92e688f013c69f90c9bbd596019ec10235bc51de" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "5de460ca7595806044eced31e3c36c159a493857" },
|
||||
"obsidian.nvim": { "branch": "main", "commit": "b101ad8988eb1452dabb6138763877a1794a1966" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
|
||||
"pretty-fold.nvim": { "branch": "master", "commit": "a7d8b424abe0eedf50116c460fbe6dfd5783b1d5" },
|
||||
"smart-splits.nvim": { "branch": "master", "commit": "c8a9173d70cbbd1f6e4a414e49e31df2b32a1362" },
|
||||
"telescope-file-browser.nvim": { "branch": "master", "commit": "6e51d0cd6447cf2525412220ff0a2885eef9039c" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "7011eaae0ac1afe036e30c95cf80200b8dc3f21a" },
|
||||
"tfm.nvim": { "branch": "main", "commit": "0fd23be8d4adebcc65a30b3870c2090b97dc1bc2" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" },
|
||||
"treesj": { "branch": "main", "commit": "070e6761d0b11a55446d988a69908f7a0928dbab" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
|
||||
"ts-node-action": { "branch": "master", "commit": "f266409809555d7604b1ba894ffad8958670d04f" },
|
||||
"vim-dadbod": { "branch": "master", "commit": "fecf5a3ecfb1869f34252c7c27351de99f01ab0e" },
|
||||
"vim-dadbod-completion": { "branch": "master", "commit": "bcdf3ff768cc7e544a0f78b0383d8719c2116569" },
|
||||
"vim-dadbod-ui": { "branch": "master", "commit": "95fd22469507e86b78aa55d868c14108adee2881" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "cbe9dfa162c178946afa689dd3f42d4ea8bf89c1" },
|
||||
"vim-illuminate": { "branch": "master", "commit": "3bd2ab64b5d63b29e05691e624927e5ebbf0fb86" },
|
||||
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
-- Highlight on yank
|
||||
-- See `:help vim.highlight.on_yank()`
|
||||
local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true })
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
end,
|
||||
group = highlight_group,
|
||||
pattern = "*",
|
||||
})
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
return {
|
||||
icons = {
|
||||
misc = {
|
||||
pint = " ",
|
||||
},
|
||||
dap = {
|
||||
Stopped = { " ", "DiagnosticWarn", "DapStoppedLine" },
|
||||
Breakpoint = " ",
|
||||
BreakpointCondition = " ",
|
||||
BreakpointRejected = { " ", "DiagnosticError" },
|
||||
LogPoint = ".>",
|
||||
},
|
||||
diagnostics = {
|
||||
Error = " ",
|
||||
Warn = " ",
|
||||
Hint = " ",
|
||||
Info = " ",
|
||||
},
|
||||
git = {
|
||||
added = " ",
|
||||
modified = " ",
|
||||
removed = " ",
|
||||
branch = "",
|
||||
},
|
||||
kinds = {
|
||||
Array = " ",
|
||||
Boolean = " ",
|
||||
Class = " ",
|
||||
Color = " ",
|
||||
Constant = " ",
|
||||
Constructor = " ",
|
||||
Copilot = " ",
|
||||
Enum = " ",
|
||||
EnumMember = " ",
|
||||
Event = " ",
|
||||
Field = " ",
|
||||
File = " ",
|
||||
Folder = " ",
|
||||
Function = " ",
|
||||
Interface = " ",
|
||||
Key = " ",
|
||||
Keyword = " ",
|
||||
Method = " ",
|
||||
Module = " ",
|
||||
Namespace = " ",
|
||||
Null = " ",
|
||||
Number = " ",
|
||||
Object = " ",
|
||||
Operator = " ",
|
||||
Package = " ",
|
||||
Property = " ",
|
||||
Reference = " ",
|
||||
Snippet = " ",
|
||||
String = " ",
|
||||
Struct = " ",
|
||||
Text = " ",
|
||||
TypeParameter = " ",
|
||||
Unit = " ",
|
||||
Value = " ",
|
||||
Variable = " ",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
-- [[ Basic Keymaps ]]
|
||||
|
||||
function MAP(mode, l, r, desc)
|
||||
vim.keymap.set(mode, l, r, { desc = desc, silent = true })
|
||||
end
|
||||
|
||||
local function default(desc)
|
||||
return {
|
||||
silent = true,
|
||||
desc = desc,
|
||||
}
|
||||
end
|
||||
|
||||
local function fixIdentation()
|
||||
local indent = 2
|
||||
vim.opt.tabstop = indent
|
||||
vim.opt.shiftwidth = indent
|
||||
vim.opt.softtabstop = indent
|
||||
|
||||
vim.cmd("retab")
|
||||
end
|
||||
|
||||
-- Keymaps for better default experience
|
||||
-- See `:help vim.keymap.set()`
|
||||
vim.keymap.set({ "n", "v" }, "<Space>", "<Nop>", { silent = true })
|
||||
|
||||
vim.keymap.set("n", "<C-s>", "<CMD>w<CR>", default("Keep cursor centered while junping"))
|
||||
|
||||
-- Remap for dealing with word wrap
|
||||
vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||
vim.keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||
|
||||
vim.keymap.set("n", "J", "mzJ`z", default("Keep cursor in column while joining lines"))
|
||||
|
||||
vim.keymap.set("n", "|", ":vs<CR>", default("Open vsplit"))
|
||||
vim.keymap.set("n", "°", ":sp<CR>", default("Open split"))
|
||||
|
||||
vim.keymap.set("n", "<C-d>", "<C-d>zz", default("Keep cursor centered while junping"))
|
||||
vim.keymap.set("n", "<C-u>", "<C-u>zz", default("Keep cursor centered while junping"))
|
||||
|
||||
vim.keymap.set("n", "n", "nzzzv", default("Keep cursor centered while searching"))
|
||||
vim.keymap.set("n", "N", "Nzzzv", default("Keep cursor centered while searching"))
|
||||
|
||||
vim.keymap.set("n", "Q", "<nop>", {})
|
||||
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>rw",
|
||||
[[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]],
|
||||
default("Search and replace current word")
|
||||
)
|
||||
|
||||
vim.keymap.set("n", "<leader>rR", ":s/", default("Search and replace inline"))
|
||||
vim.keymap.set("n", "<leader>rr", ":%s/", default("Search and replace globally"))
|
||||
vim.keymap.set("v", "<leader>r", ":s/", default("Search and replace in selection"))
|
||||
|
||||
vim.keymap.set("v", "p", [["_dP]], default("Paste whitout lossing yanked text"))
|
||||
|
||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", default("Move selection down"))
|
||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv", default("Move selection up"))
|
||||
vim.keymap.set("n", "<Leader>uI", fixIdentation, default("Fix identation"))
|
||||
|
||||
vim.keymap.set("n", "<Leader>uh", ":nohl<CR>", default("Remove search highlight"))
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
-- [[ Setting options ]]
|
||||
-- See `:help vim.o`
|
||||
|
||||
-- Set <space> as the leader key
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
local opt = vim.opt
|
||||
|
||||
-- stylua: ignore
|
||||
opt.autowrite = true -- Enable auto write
|
||||
opt.clipboard = "unnamedplus" -- Sync with system clipboard
|
||||
opt.completeopt = "menu,menuone,noselect"
|
||||
opt.conceallevel = 3 -- Hide * markup for bold and italic
|
||||
opt.confirm = true -- Confirm to save changes before exiting modified buffer
|
||||
opt.cursorline = true -- Enable highlighting of the current line
|
||||
opt.expandtab = true -- Use spaces instead of tabs
|
||||
opt.formatoptions = "jcroqlnt" -- tcqj
|
||||
opt.grepformat = "%f:%l:%c:%m"
|
||||
opt.grepprg = "rg --vimgrep"
|
||||
opt.ignorecase = true -- Ignore case
|
||||
opt.inccommand = "nosplit" -- preview incremental substitute
|
||||
opt.laststatus = 0
|
||||
opt.list = true -- Show some invisible characters (tabs...
|
||||
opt.mouse = "a" -- Enable mouse mode
|
||||
opt.number = true -- Print line number
|
||||
opt.pumblend = 10 -- Popup blend
|
||||
opt.pumheight = 10 -- Maximum number of entries in a popup
|
||||
opt.relativenumber = true -- Relative line numbers
|
||||
opt.scrolloff = 8 -- Lines of context
|
||||
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
|
||||
opt.shiftround = true -- Round indent
|
||||
opt.shiftwidth = 2 -- Size of an indent
|
||||
opt.shortmess:append({ W = true, I = true, c = true })
|
||||
opt.showmode = false -- Dont show mode since we have a statusline
|
||||
opt.sidescrolloff = 8 -- Columns of context
|
||||
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
|
||||
opt.smartcase = true -- Don't ignore case with capitals
|
||||
opt.smartindent = true -- Insert indents automatically
|
||||
opt.spelllang = { "en" }
|
||||
opt.splitbelow = true -- Put new windows below current
|
||||
opt.splitright = true -- Put new windows right of current
|
||||
opt.tabstop = 2 -- Number of spaces tabs count for
|
||||
opt.termguicolors = true -- True color support
|
||||
opt.timeoutlen = 300
|
||||
opt.undofile = true
|
||||
opt.undolevels = 10000
|
||||
opt.updatetime = 200 -- Save swap file and trigger CursorHold
|
||||
opt.wildmode = "longest,list:full" -- Command-line completion mode
|
||||
opt.winminwidth = 5 -- Minimum window width
|
||||
opt.wrap = false -- Disable line wrap
|
||||
|
||||
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
||||
|
||||
vim.filetype.add({
|
||||
-- Detect and assign filetype based on the extension of the filename
|
||||
extension = {
|
||||
mdx = "mdx",
|
||||
log = "log",
|
||||
conf = "conf",
|
||||
env = "dotenv",
|
||||
},
|
||||
-- Detect and apply filetypes based on the entire filename
|
||||
filename = {
|
||||
[".env"] = "dotenv",
|
||||
["env"] = "dotenv",
|
||||
["tsconfig.json"] = "jsonc",
|
||||
},
|
||||
-- Detect and apply filetypes based on certain patterns of the filenames
|
||||
pattern = {
|
||||
-- INFO: Match filenames like - ".env.example", ".env.local" and so on
|
||||
["%.env%.[%w_.-]+"] = "dotenv",
|
||||
[".*%.blade%.php"] = "blade",
|
||||
},
|
||||
})
|
||||
|
|
@ -1,209 +0,0 @@
|
|||
return {
|
||||
"jackMort/ChatGPT.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
api_key_cmd = nil,
|
||||
yank_register = "+",
|
||||
edit_with_instructions = {
|
||||
diff = false,
|
||||
keymaps = {
|
||||
-- close = "<C-c>",
|
||||
-- accept = "<C-y>",
|
||||
-- toggle_diff = "<C-d>",
|
||||
-- toggle_settings = "<C-o>",
|
||||
-- toggle_help = "<C-h>",
|
||||
-- cycle_windows = "<Tab>",
|
||||
-- use_output_as_input = "<C-i>",
|
||||
submit = "<C-a>",
|
||||
},
|
||||
},
|
||||
chat = {
|
||||
-- welcome_message = WELCOME_MESSAGE,
|
||||
loading_text = "Loading, please wait ...",
|
||||
question_sign = "", -- 🙂
|
||||
answer_sign = "ﮧ", -- 🤖
|
||||
border_left_sign = "",
|
||||
border_right_sign = "",
|
||||
max_line_length = 120,
|
||||
sessions_window = {
|
||||
active_sign = " ",
|
||||
inactive_sign = " ",
|
||||
current_line_sign = "",
|
||||
border = {
|
||||
style = "rounded",
|
||||
text = {
|
||||
top = " Sessions ",
|
||||
},
|
||||
},
|
||||
win_options = {
|
||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
|
||||
},
|
||||
},
|
||||
keymaps = {
|
||||
-- close = "<C-c>",
|
||||
-- yank_last = "<C-y>",
|
||||
-- yank_last_code = "<C-k>",
|
||||
-- scroll_up = "<C-u>",
|
||||
-- scroll_down = "<C-d>",
|
||||
-- new_session = "<C-n>",
|
||||
-- cycle_windows = "<Tab>",
|
||||
-- cycle_modes = "<C-f>",
|
||||
-- next_message = "<C-j>",
|
||||
-- prev_message = "<C-k>",
|
||||
-- select_session = "<Space>",
|
||||
-- rename_session = "r",
|
||||
-- delete_session = "d",
|
||||
-- draft_message = "<C-r>",
|
||||
-- edit_message = "e",
|
||||
-- delete_message = "d",
|
||||
-- toggle_settings = "<C-o>",
|
||||
-- toggle_sessions = "<C-p>",
|
||||
-- toggle_help = "<C-h>",
|
||||
-- toggle_message_role = "<C-r>",
|
||||
-- toggle_system_role_open = "<C-s>",
|
||||
-- stop_generating = "<C-x>",
|
||||
submit = "<C-a>",
|
||||
},
|
||||
},
|
||||
popup_layout = {
|
||||
default = "center",
|
||||
center = {
|
||||
width = "80%",
|
||||
height = "80%",
|
||||
},
|
||||
right = {
|
||||
width = "30%",
|
||||
width_settings_open = "50%",
|
||||
},
|
||||
},
|
||||
popup_window = {
|
||||
border = {
|
||||
highlight = "FloatBorder",
|
||||
style = "rounded",
|
||||
text = {
|
||||
top = " ChatGPT ",
|
||||
},
|
||||
},
|
||||
win_options = {
|
||||
wrap = true,
|
||||
linebreak = true,
|
||||
foldcolumn = "1",
|
||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
|
||||
},
|
||||
buf_options = {
|
||||
filetype = "markdown",
|
||||
},
|
||||
},
|
||||
system_window = {
|
||||
border = {
|
||||
highlight = "FloatBorder",
|
||||
style = "rounded",
|
||||
text = {
|
||||
top = " SYSTEM ",
|
||||
},
|
||||
},
|
||||
win_options = {
|
||||
wrap = true,
|
||||
linebreak = true,
|
||||
foldcolumn = "2",
|
||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
|
||||
},
|
||||
},
|
||||
popup_input = {
|
||||
prompt = " ",
|
||||
border = {
|
||||
highlight = "FloatBorder",
|
||||
style = "rounded",
|
||||
text = {
|
||||
top_align = "center",
|
||||
top = " Prompt ",
|
||||
},
|
||||
},
|
||||
win_options = {
|
||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
|
||||
},
|
||||
submit = "<C-Enter>",
|
||||
submit_n = "<Enter>",
|
||||
max_visible_lines = 20,
|
||||
},
|
||||
settings_window = {
|
||||
setting_sign = " ",
|
||||
border = {
|
||||
style = "rounded",
|
||||
text = {
|
||||
top = " Settings ",
|
||||
},
|
||||
},
|
||||
win_options = {
|
||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
|
||||
},
|
||||
},
|
||||
help_window = {
|
||||
setting_sign = " ",
|
||||
border = {
|
||||
style = "rounded",
|
||||
text = {
|
||||
top = " Help ",
|
||||
},
|
||||
},
|
||||
win_options = {
|
||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
|
||||
},
|
||||
},
|
||||
openai_params = {
|
||||
model = "gpt-3.5-turbo",
|
||||
frequency_penalty = 0,
|
||||
presence_penalty = 0,
|
||||
max_tokens = 300,
|
||||
temperature = 0,
|
||||
top_p = 1,
|
||||
n = 1,
|
||||
},
|
||||
openai_edit_params = {
|
||||
model = "gpt-3.5-turbo",
|
||||
frequency_penalty = 0,
|
||||
presence_penalty = 0,
|
||||
temperature = 0,
|
||||
top_p = 1,
|
||||
n = 1,
|
||||
},
|
||||
use_openai_functions_for_edits = false,
|
||||
actions_paths = {},
|
||||
show_quickfixes_cmd = "Trouble quickfix",
|
||||
predefined_chat_gpt_prompts = "https://raw.githubusercontent.com/f/awesome-chatgpt-prompts/main/prompts.csv",
|
||||
highlights = {
|
||||
help_key = "@symbol",
|
||||
help_description = "@comment",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("chatgpt").setup()
|
||||
end,
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"folke/trouble.nvim",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>pp", "<cmd>ChatGPT<CR>", desc = "ChatGPT" },
|
||||
{ "<leader>pe", "<cmd>ChatGPTEditWithInstruction<CR>", desc = "Edit with instruction", mode = { "n", "v" } },
|
||||
{ "<leader>pa", "<cmd>ChatGPTActAs<CR>", desc = "Act as", mode = { "n", "v" } },
|
||||
{ "<leader>pg", "<cmd>ChatGPTRun grammar_correction<CR>", desc = "Grammar Correction", mode = { "n", "v" } },
|
||||
{ "<leader>pT", "<cmd>ChatGPTRun translate<CR>", desc = "Translate", mode = { "n", "v" } },
|
||||
{ "<leader>pk", "<cmd>ChatGPTRun keywords<CR>", desc = "Keywords", mode = { "n", "v" } },
|
||||
{ "<leader>pd", "<cmd>ChatGPTRun docstring<CR>", desc = "Docstring", mode = { "n", "v" } },
|
||||
{ "<leader>pt", "<cmd>ChatGPTRun add_tests<CR>", desc = "Add Tests", mode = { "n", "v" } },
|
||||
{ "<leader>po", "<cmd>ChatGPTRun optimize_code<CR>", desc = "Optimize Code", mode = { "n", "v" } },
|
||||
{ "<leader>ps", "<cmd>ChatGPTRun summarize<CR>", desc = "Summarize", mode = { "n", "v" } },
|
||||
{ "<leader>pf", "<cmd>ChatGPTRun fix_bugs<CR>", desc = "Fix Bugs", mode = { "n", "v" } },
|
||||
{ "<leader>px", "<cmd>ChatGPTRun explain_code<CR>", desc = "Explain Code", mode = { "n", "v" } },
|
||||
{ "<leader>pr", "<cmd>ChatGPTRun roxygen_edit<CR>", desc = "Roxygen Edit", mode = { "n", "v" } },
|
||||
{
|
||||
"<leader>pl",
|
||||
"<cmd>ChatGPTRun code_readability_analysis<CR>",
|
||||
desc = "Code Readability Analysis",
|
||||
mode = { "n", "v" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
opts = {}, -- this is equalent to setup({}) function
|
||||
}
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
return {
|
||||
"akinsho/bufferline.nvim",
|
||||
event = "VeryLazy",
|
||||
keys = {
|
||||
{ "<leader>bp", "<Cmd>BufferLineTogglePin<CR>", desc = "Toggle pin" },
|
||||
{ "<leader>bP", "<Cmd>BufferLineGroupClose ungrouped<CR>", desc = "Close non-pinned buffers" },
|
||||
{ "<leader>bO", "<Cmd>BufferLineCloseOthers<CR>", desc = "Close non focused buffers" },
|
||||
{ "<leader>bA", "<Cmd>bufdo bd<CR>", desc = "Close all buffers" },
|
||||
{ "<leader>bh", "<Cmd>BufferLineMovePrev<CR>", desc = "Move buffer to right" },
|
||||
{ "<leader>bl", "<Cmd>BufferLineMoveNext<CR>", desc = "Move buffer to left" },
|
||||
{ "<S-h>", "<cmd>BufferLineCyclePrev<cr>", desc = "Prev buffer" },
|
||||
{ "<S-l>", "<cmd>BufferLineCycleNext<cr>", desc = "Next buffer" },
|
||||
},
|
||||
dependencies = {
|
||||
{
|
||||
"echasnovski/mini.bufremove",
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>bc", function() require("mini.bufremove").delete(0, false) end, desc = "Close Buffer" },
|
||||
{ "<leader>bC", function() require("mini.bufremove").delete(0, true) end, desc = "Close Buffer (Force)" },
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local opts = {
|
||||
highlights = { separator = { bg = "NONE" } },
|
||||
options = {
|
||||
-- separator_style = "padded_slant",
|
||||
-- themable = true,
|
||||
close_command = function(n)
|
||||
require("mini.bufremove").delete(n, false)
|
||||
end,
|
||||
-- stylua: ignore
|
||||
always_show_bufferline = false,
|
||||
right_mouse_command = function(n)
|
||||
require("mini.bufremove").delete(n, false)
|
||||
end,
|
||||
diagnostics = "nvim_lsp",
|
||||
diagnostics_indicator = function(_, _, diag)
|
||||
local icons = require("aleidk.constants").icons.diagnostics
|
||||
local ret = (diag.error and icons.Error .. diag.error .. " " or "")
|
||||
.. (diag.warning and icons.Warn .. diag.warning or "")
|
||||
return vim.trim(ret)
|
||||
end,
|
||||
-- return false to exluce buffers
|
||||
custom_filter = function(buf_number)
|
||||
if vim.bo[buf_number].filetype == "qf" then
|
||||
return false
|
||||
end
|
||||
if vim.fn.bufname(buf_number) == "" then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end,
|
||||
offsets = {
|
||||
{
|
||||
filetype = "NvimTree",
|
||||
text = "nvim-tree",
|
||||
highlight = "Directory",
|
||||
text_align = "left",
|
||||
},
|
||||
},
|
||||
groups = {
|
||||
items = {
|
||||
require("bufferline.groups").builtin.pinned:with({ icon = "" }),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
require("bufferline").setup(opts)
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
return { -- Change colors.none if not using a transparent background
|
||||
"catppuccin/nvim",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
opts = {
|
||||
flavour = "macchiato",
|
||||
transparent_background = false,
|
||||
integrations = {
|
||||
cmp = true,
|
||||
notify = true,
|
||||
harpoon = true,
|
||||
mason = true,
|
||||
neogit = true,
|
||||
noice = true,
|
||||
lsp_trouble = true,
|
||||
indent_blankline = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
custom_highlights = function(colors)
|
||||
return {
|
||||
-- Fix colors for cmp
|
||||
Pmenu = { bg = colors.none, blend = 0 },
|
||||
FloatBorder = { bg = colors.none },
|
||||
CmpItemMenu = { fg = colors.text, bg = colors.none },
|
||||
-- dadbod-ui
|
||||
NotificationInfo = { bg = colors.none, fg = colors.text },
|
||||
NotificationWarning = { bg = colors.none, fg = colors.yellow },
|
||||
NotificationError = { bg = colors.none, fg = colors.red },
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
config = function(_, opts)
|
||||
require("catppuccin").setup(opts)
|
||||
vim.cmd.colorscheme("catppuccin")
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"echasnovski/mini.comment",
|
||||
version = "*",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
{ "nvim-treesitter/nvim-treesitter-context" },
|
||||
},
|
||||
opts = {
|
||||
options = {
|
||||
custom_commentstring = function()
|
||||
return require("ts_context_commentstring.internal").calculate_commentstring()
|
||||
or vim.bo.commentstring
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"LudoPinelli/comment-box.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("comment-box").setup({
|
||||
outer_blank_lines = true,
|
||||
})
|
||||
|
||||
local cb = require("comment-box")
|
||||
|
||||
-- left aligned fixed size box with left aligned text
|
||||
MAP({ "n", "v" }, "gcb", cb.lcbox, "Create a comment box")
|
||||
-- centered adapted box with centered text
|
||||
MAP({ "n", "v" }, "gll", cb.cline, "Create a comment line")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"danymat/neogen",
|
||||
config = { snippet_engine = "luasnip" },
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||
version = "*", -- stable releases
|
||||
keys = {
|
||||
{
|
||||
"gcd",
|
||||
function()
|
||||
require("neogen").generate()
|
||||
end,
|
||||
desc = "Generate comment docstring",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,86 +0,0 @@
|
|||
---@diagnostic disable: missing-fields
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
version = false, -- last release is way too old
|
||||
event = "InsertEnter",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"petertriho/cmp-git",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"L3MON4D3/LuaSnip",
|
||||
"windwp/nvim-autopairs",
|
||||
},
|
||||
config = function()
|
||||
vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true })
|
||||
local cmp = require("cmp")
|
||||
|
||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||
|
||||
local defaults = require("cmp.config.default")()
|
||||
local window_opts = {
|
||||
border = "rounded",
|
||||
side_padding = 1,
|
||||
-- fix colors for catppuccin colorscheme
|
||||
winhighlight = "Normal:Pmenu,FloatBorder:FloatBorder,CursorLine:PmenuSel,Search:None",
|
||||
}
|
||||
local opts = {
|
||||
completion = {
|
||||
completeopt = "menu,menuone,noinsert",
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
["<C-j>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
["<C-k>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
["<C-u>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<BR>"] = cmp.mapping.abort(),
|
||||
["<C-CR>"] = cmp.mapping.confirm({ select = false }), -- Confirm only if selected an item
|
||||
["<CR>"] = cmp.mapping.confirm({
|
||||
-- Auto confirms first item
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
}),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
}),
|
||||
formatting = {
|
||||
fields = { "kind", "abbr", "menu" },
|
||||
format = function(_, item)
|
||||
local icons = require("aleidk.constants").icons.kinds
|
||||
if icons[item.kind] then
|
||||
item.kind = icons[item.kind] .. item.kind
|
||||
end
|
||||
return item
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(window_opts),
|
||||
documentation = cmp.config.window.bordered(window_opts),
|
||||
},
|
||||
experimental = {
|
||||
ghost_text = {
|
||||
hl_group = "CmpGhostText",
|
||||
},
|
||||
},
|
||||
sorting = defaults.sorting,
|
||||
}
|
||||
|
||||
cmp.setup(opts)
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
return {
|
||||
"goolord/alpha-nvim",
|
||||
lazy = false,
|
||||
opts = function()
|
||||
local dashboard = require("alpha.themes.dashboard")
|
||||
|
||||
dashboard.section.header.val = {
|
||||
" ████ ███ █████ █████ ",
|
||||
" ░░███ ░░░ ░░███ ░░███ ",
|
||||
" ██████ ░███ ██████ ████ ███████ ░███ █████",
|
||||
" ░░░░░███ ░███ ███░░███░░███ ███░░███ ░███░░███ ",
|
||||
" ███████ ░███ ░███████ ░███ ░███ ░███ ░██████░ ",
|
||||
" ███░░███ ░███ ░███░░░ ░███ ░███ ░███ ░███░░███ ",
|
||||
"░░████████ █████░░██████ █████░░████████ ████ █████",
|
||||
" ░░░░░░░░ ░░░░░ ░░░░░░ ░░░░░ ░░░░░░░░ ░░░░ ░░░░░ ",
|
||||
}
|
||||
dashboard.section.header.opts.hl = "DashboardHeader"
|
||||
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button("LDR f f", " Find File ", "<leader>ff"),
|
||||
dashboard.button("LDR LDR t", " Harpoon", "<leader><leader>t"),
|
||||
dashboard.button("LDR g g", " Git ", "<leader>gg"),
|
||||
}
|
||||
|
||||
dashboard.section.footer.val =
|
||||
{ " ", " ", " ", "Nvim loaded " .. require("lazy").stats().count .. " plugins " }
|
||||
dashboard.section.footer.opts.hl = "DashboardFooter"
|
||||
|
||||
dashboard.config.layout[1].val = vim.fn.max({ 2, vim.fn.floor(vim.fn.winheight(0) * 0.2) })
|
||||
dashboard.config.layout[3].val = 5
|
||||
dashboard.config.opts.noautocmd = true
|
||||
|
||||
return dashboard.opts
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
return {
|
||||
"kristijanhusak/vim-dadbod-ui",
|
||||
dependencies = {
|
||||
{ "tpope/vim-dadbod", lazy = true },
|
||||
{ "kristijanhusak/vim-dadbod-completion", ft = { "sql", "mysql", "plsql" }, lazy = true },
|
||||
},
|
||||
cmd = {
|
||||
"DBUI",
|
||||
"DBUIToggle",
|
||||
"DBUIAddConnection",
|
||||
"DBUIFindBuffer",
|
||||
},
|
||||
keys = {
|
||||
{ "<Leader>ud", "<CMD>DBUIToggle<CR>", desc = "Toggle DB UI" },
|
||||
},
|
||||
init = function()
|
||||
-- Your DBUI configuration
|
||||
vim.g.db_ui_use_nerd_fonts = 1
|
||||
vim.g.db_ui_force_echo_notifications = 1
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = {
|
||||
"sql",
|
||||
"mysql",
|
||||
"plsql",
|
||||
},
|
||||
command = [[setlocal omnifunc=vim_dadbod_completion#omni]],
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = {
|
||||
"sql",
|
||||
"mysql",
|
||||
"plsql",
|
||||
},
|
||||
callback = function()
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
require("cmp").setup.buffer({
|
||||
sources = { { name = "vim-dadbod-completion" } },
|
||||
})
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
return {
|
||||
-- better imputs
|
||||
"stevearc/dressing.nvim",
|
||||
opts = {
|
||||
input = {
|
||||
-- handle by noice
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,100 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
enabled = false,
|
||||
version = "*",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
keys = {
|
||||
{ "<Leader>e", "<CMD>NvimTreeToggle<CR>", desc = "Open file explorer" },
|
||||
},
|
||||
cmd = { "NvimTreeToggle", "Tree" },
|
||||
config = function()
|
||||
local tree = require("nvim-tree")
|
||||
local api = require("nvim-tree.api")
|
||||
|
||||
tree.setup({
|
||||
hijack_unnamed_buffer_when_opening = true,
|
||||
disable_netrw = false,
|
||||
hijack_netrw = false, -- handle by telescope browser
|
||||
hijack_cursor = true, -- cursor at the start of filename
|
||||
sync_root_with_cwd = true,
|
||||
respect_buf_cwd = true,
|
||||
update_focused_file = {
|
||||
enable = true, -- focus curren file
|
||||
update_root = true,
|
||||
},
|
||||
actions = { open_file = { quit_on_open = true } },
|
||||
renderer = {
|
||||
full_name = true, -- show remaining name in floating text
|
||||
group_empty = true, -- group empty folders
|
||||
add_trailing = true, -- Trailing slash to folders
|
||||
highlight_opened_files = "all",
|
||||
highlight_git = true,
|
||||
},
|
||||
view = {
|
||||
centralize_selection = true, -- center current file on enter
|
||||
width = 30, -- N° of columns or %
|
||||
},
|
||||
on_attach = function(bufnr)
|
||||
local function opts(desc)
|
||||
return {
|
||||
desc = "nvim-tree: " .. desc,
|
||||
buffer = bufnr,
|
||||
noremap = true,
|
||||
silent = true,
|
||||
nowait = true,
|
||||
}
|
||||
end
|
||||
|
||||
-- Check defaults here: https://github.com/nvim-tree/nvim-tree.lua/wiki/Migrating-To-on_attach
|
||||
api.config.mappings.default_on_attach(bufnr)
|
||||
|
||||
vim.keymap.set("n", "l", api.node.open.edit, opts("Open"))
|
||||
vim.keymap.set("n", "o", api.node.open.edit, opts("Open"))
|
||||
vim.keymap.set("n", "<CR>", api.node.open.edit, opts("Open"))
|
||||
vim.keymap.set("n", "<2-LeftMouse>", api.node.open.edit, opts("Open"))
|
||||
vim.keymap.set("n", "s", api.node.open.vertical, opts("Open in vsplit"))
|
||||
vim.keymap.set("n", "v", api.node.open.horizontal, opts("Open in hsplit"))
|
||||
vim.keymap.set("n", "t", api.node.open.tab, opts("Open in tab"))
|
||||
vim.keymap.set("n", "h", api.node.navigate.parent_close, opts("Close dir"))
|
||||
vim.keymap.set("n", "<BS>", api.node.navigate.parent_close, opts("Close dir"))
|
||||
vim.keymap.set("n", "i", api.tree.toggle_hidden_filter, opts("Toggle Dotfiles"))
|
||||
vim.keymap.set("n", "I", api.tree.toggle_gitignore_filter, opts("Toggle Git Ignore"))
|
||||
end,
|
||||
})
|
||||
|
||||
-- Auto open when a dir is opened
|
||||
|
||||
local function open_nvim_tree(data)
|
||||
-- buffer is a directory
|
||||
local directory = vim.fn.isdirectory(data.file) == 1
|
||||
|
||||
if not directory then
|
||||
return
|
||||
end
|
||||
|
||||
-- create a new, empty buffer
|
||||
vim.cmd.enew()
|
||||
|
||||
-- wipe the directory buffer
|
||||
vim.cmd.bw(data.buf)
|
||||
|
||||
-- change to the directory
|
||||
vim.cmd.cd(data.file)
|
||||
|
||||
-- open the tree
|
||||
require("nvim-tree.api").tree.open()
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
|
||||
vim.api.nvim_create_user_command("Tree", "NvimTreeToggle", {})
|
||||
|
||||
-- bindings
|
||||
-- disabled to discourage the use of this plugin without disabling it
|
||||
-- vim.keymap.set("n", "<leader>e", ":NvimTreeToggle<CR>", { desc = "Toggle file tree", silent = true })
|
||||
-- vim.keymap.set("n", "<C-e>", ":NvimTreeToggle<CR>", { desc = "Toggle file tree", silent = true })
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
return {
|
||||
"rolv-apneseth/tfm.nvim",
|
||||
lazy = false,
|
||||
opts = {
|
||||
-- TFM to use
|
||||
-- Possible choices: "ranger" | "nnn" | "lf" | "vifm" | "yazi" (default)
|
||||
file_manager = "yazi",
|
||||
-- Replace netrw entirely
|
||||
-- Default: false
|
||||
replace_netrw = true,
|
||||
-- Enable creation of commands
|
||||
-- Default: false
|
||||
-- Commands:
|
||||
-- Tfm: selected file(s) will be opened in the current window
|
||||
-- TfmSplit: selected file(s) will be opened in a horizontal split
|
||||
-- TfmVsplit: selected file(s) will be opened in a vertical split
|
||||
-- TfmTabedit: selected file(s) will be opened in a new tab page
|
||||
enable_cmds = true,
|
||||
-- Custom keybindings only applied within the TFM buffer
|
||||
-- Default: {}
|
||||
keybindings = {
|
||||
["<ESC>"] = "q",
|
||||
},
|
||||
-- Customise UI. The below options are the default
|
||||
ui = {
|
||||
border = "rounded",
|
||||
height = 1,
|
||||
width = 1,
|
||||
x = 0.5,
|
||||
y = 0.5,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>e",
|
||||
function()
|
||||
require("tfm").open()
|
||||
end,
|
||||
desc = "TFM",
|
||||
},
|
||||
{
|
||||
"<leader>mh",
|
||||
function()
|
||||
local tfm = require("tfm")
|
||||
tfm.open(nil, tfm.OPEN_MODE.split)
|
||||
end,
|
||||
desc = "TFM - horizontal split",
|
||||
},
|
||||
{
|
||||
"<leader>mv",
|
||||
function()
|
||||
local tfm = require("tfm")
|
||||
tfm.open(nil, tfm.OPEN_MODE.vsplit)
|
||||
end,
|
||||
desc = "TFM - vertical split",
|
||||
},
|
||||
{
|
||||
"<leader>mt",
|
||||
function()
|
||||
local tfm = require("tfm")
|
||||
tfm.open(nil, tfm.OPEN_MODE.tabedit)
|
||||
end,
|
||||
desc = "TFM - new tab",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
return {
|
||||
"stevearc/conform.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
-- See aviable formatters in: https://github.com/stevearc/conform.nvim#formatters
|
||||
-- Formatters can be installed by mason
|
||||
formatters_by_ft = {
|
||||
-- Conform will run multiple formatters sequentially
|
||||
lua = { "stylua" },
|
||||
blade = { "blade-formatter" },
|
||||
python = { "blue" },
|
||||
-- Use a sub-list to run only the first available formatter
|
||||
json = { { "prettierd", "prettier" } },
|
||||
jsonc = { { "prettierd", "prettier" } },
|
||||
javascript = { { "prettierd", "prettier" } },
|
||||
typescript = { { "prettierd", "prettier" } },
|
||||
javascriptreact = { { "prettierd", "prettier" } },
|
||||
typescriptreact = { { "prettierd", "prettier" } },
|
||||
css = { { "prettierd", "prettier" } },
|
||||
scss = { { "prettierd", "prettier" } },
|
||||
html = { "prettierd" },
|
||||
sh = { "shfmt" },
|
||||
zsh = { "shfmt" },
|
||||
markdown = { "markdownlint" },
|
||||
-- Use the "_" filetype to run formatters on filetypes that don't
|
||||
-- have other formatters configured.
|
||||
["_"] = { "trim_whitespace" },
|
||||
},
|
||||
format_on_save = function(bufnr)
|
||||
-- Disable with a global or buffer-local variable
|
||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||
return
|
||||
end
|
||||
return { timeout_ms = 2000, lsp_fallback = true }
|
||||
end,
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("conform").setup(opts)
|
||||
|
||||
local function toggleAutoFormat()
|
||||
-- to make this global, change b to g
|
||||
if vim.b.disable_autoformat == nil then
|
||||
vim.b.disable_autoformat = true
|
||||
return
|
||||
end
|
||||
|
||||
vim.b.disable_autoformat = not vim.b.disable_autoformat
|
||||
end
|
||||
|
||||
MAP("n", "<leader>uf", toggleAutoFormat, "Toggle auto format")
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
opts = {
|
||||
-- See `:help gitsigns.txt`
|
||||
signs = {
|
||||
add = { text = "▎" },
|
||||
change = { text = "▎" },
|
||||
delete = { text = "" },
|
||||
topdelete = { text = "" },
|
||||
changedelete = { text = "▎" },
|
||||
untracked = { text = "▎" },
|
||||
},
|
||||
on_attach = function(buffer)
|
||||
local gs = package.loaded.gitsigns
|
||||
|
||||
local function map(mode, l, r, desc)
|
||||
vim.keymap.set(mode, "<leader>g" .. l, r, { buffer = buffer, desc = desc })
|
||||
end
|
||||
|
||||
-- stylua: ignore start
|
||||
map("n", "j", gs.next_hunk, "Next Hunk")
|
||||
map("n", "k", gs.prev_hunk, "Prev Hunk")
|
||||
map({ "n", "v" }, "s", ":Gitsigns stage_hunk<CR>", "Stage Hunk")
|
||||
map({ "n", "v" }, "r", ":Gitsigns reset_hunk<CR>", "Reset Hunk")
|
||||
map("n", "u", gs.undo_stage_hunk, "Undo Stage Hunk")
|
||||
map("n", "R", gs.reset_buffer, "Reset Buffer")
|
||||
map("n", "p", gs.preview_hunk, "Preview Hunk")
|
||||
map("n", "l", function() gs.blame_line({full = true}) end, "Blame Line")
|
||||
map("n", "d", gs.diffthis, "Diff This")
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- Testing main Git plugin
|
||||
|
||||
{
|
||||
"tpope/vim-fugitive",
|
||||
event = "VeryLazy",
|
||||
keys = {
|
||||
{ "<Leader>gL", ":Git log -p -- %<CR>", desc = "Log of open file" },
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"kdheepak/lazygit.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>gG", ":LazyGit<CR>", desc = "Lazygit" },
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"NeogitOrg/neogit",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim", -- required
|
||||
"nvim-telescope/telescope.nvim", -- optional
|
||||
"sindrets/diffview.nvim", -- optional
|
||||
"ibhagwan/fzf-lua", -- optional
|
||||
},
|
||||
config = true,
|
||||
opts = {
|
||||
disable_insert_on_commit = "auto",
|
||||
kind = "replace",
|
||||
disable_line_numbers = false,
|
||||
console_timeout = 8000,
|
||||
-- commit_editor = {
|
||||
-- kind = "tab",
|
||||
-- },
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>gg",
|
||||
function()
|
||||
require("neogit").open()
|
||||
end,
|
||||
desc = "Neogit",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
return {
|
||||
"ThePrimeagen/harpoon",
|
||||
-- lazy = false,
|
||||
opts = {
|
||||
global_settings = {
|
||||
-- sets the marks upon calling `toggle` on the ui, instead of require `:w`.
|
||||
save_on_toggle = true,
|
||||
-- saves the harpoon file upon every change. disabling is unrecommended.
|
||||
save_on_change = true,
|
||||
-- sets harpoon to run the command immediately as it's passed to the terminal when calling `sendCommand`.
|
||||
enter_on_sendcmd = true,
|
||||
-- closes any tmux windows harpoon that harpoon creates when you close Neovim.
|
||||
tmux_autoclose_windows = false,
|
||||
-- filetypes that you want to prevent from adding to the harpoon list menu.
|
||||
excluded_filetypes = { "harpoon" },
|
||||
-- set marks specific to each git branch inside git repository
|
||||
mark_branch = false,
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("harpoon").setup(opts)
|
||||
|
||||
local mark = require("harpoon.mark")
|
||||
local ui = require("harpoon.ui")
|
||||
local telescope = require("telescope")
|
||||
|
||||
telescope.load_extension("harpoon")
|
||||
|
||||
local function map(key, func, desc)
|
||||
vim.keymap.set("n", "<leader><leader>" .. key, func, { desc = desc })
|
||||
end
|
||||
|
||||
map("n", mark.add_file, "Add mark")
|
||||
|
||||
map("t", ui.toggle_quick_menu, "Toogle UI")
|
||||
|
||||
map("j", function()
|
||||
ui.nav_file(1)
|
||||
end, "Navigate to file 1")
|
||||
|
||||
map("k", function()
|
||||
ui.nav_file(2)
|
||||
end, "Navigate to file 2")
|
||||
|
||||
map("l", function()
|
||||
ui.nav_file(3)
|
||||
end, "Navigate to file 3")
|
||||
|
||||
map("ñ", function()
|
||||
ui.nav_file(4)
|
||||
end, "Navigate to file 4")
|
||||
|
||||
map("T", "<CMD>Telescope harpoon marks<CR>", "Open marks in telescope")
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
return {
|
||||
-- Add indentation guides even on blank lines
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
main = "ibl",
|
||||
opts = {
|
||||
-- char = "▏",
|
||||
indent = {
|
||||
char = "│",
|
||||
tab_char = "│",
|
||||
},
|
||||
scope = {
|
||||
enabled = true,
|
||||
},
|
||||
exclude = {
|
||||
filetypes = {
|
||||
"help",
|
||||
"alpha",
|
||||
"dashboard",
|
||||
"neo-tree",
|
||||
"Trouble",
|
||||
"lazy",
|
||||
"mason",
|
||||
"notify",
|
||||
"toggleterm",
|
||||
"lazyterm",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
return {
|
||||
-- Detect tabstop and shiftwidth automatically
|
||||
"tpope/vim-sleuth",
|
||||
|
||||
{
|
||||
-- Highlight word under cursor
|
||||
"RRethy/vim-illuminate",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
opts = { delay = 200 },
|
||||
config = function(_, opts)
|
||||
require("illuminate").configure(opts)
|
||||
end,
|
||||
},
|
||||
{ "nvim-treesitter/nvim-treesitter-context" },
|
||||
{
|
||||
"uga-rosa/ccc.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
auto_enable = true,
|
||||
lsp = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
return {
|
||||
"echasnovski/mini.clue",
|
||||
version = "*",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
local miniclue = require("mini.clue")
|
||||
miniclue.setup({
|
||||
triggers = {
|
||||
-- Leader triggers
|
||||
{ mode = "n", keys = "<Leader>" },
|
||||
{ mode = "x", keys = "<Leader>" },
|
||||
|
||||
-- Built-in completion
|
||||
{ mode = "i", keys = "<C-x>" },
|
||||
|
||||
-- `g` key
|
||||
{ mode = "n", keys = "g" },
|
||||
{ mode = "x", keys = "g" },
|
||||
|
||||
-- Marks
|
||||
{ mode = "n", keys = "'" },
|
||||
{ mode = "n", keys = "`" },
|
||||
{ mode = "x", keys = "'" },
|
||||
{ mode = "x", keys = "`" },
|
||||
|
||||
-- Registers
|
||||
{ mode = "n", keys = '"' },
|
||||
{ mode = "x", keys = '"' },
|
||||
{ mode = "i", keys = "<C-r>" },
|
||||
{ mode = "c", keys = "<C-r>" },
|
||||
|
||||
-- Window commands
|
||||
{ mode = "n", keys = "<C-w>" },
|
||||
|
||||
-- `z` key
|
||||
{ mode = "n", keys = "z" },
|
||||
{ mode = "x", keys = "z" },
|
||||
},
|
||||
|
||||
-- Add a "postkeys" value to activate those keys after others
|
||||
clues = {
|
||||
miniclue.gen_clues.builtin_completion(),
|
||||
miniclue.gen_clues.g(),
|
||||
miniclue.gen_clues.marks(),
|
||||
miniclue.gen_clues.registers(),
|
||||
miniclue.gen_clues.windows(),
|
||||
miniclue.gen_clues.z(),
|
||||
|
||||
{ mode = "n", keys = "<Leader><Leader>", desc = "+Harpoon" },
|
||||
{ mode = "n", keys = "<Leader>b", desc = "+Buffers" },
|
||||
{ mode = "n", keys = "<Leader>bh", postkeys = "<Leader>b" },
|
||||
{ mode = "n", keys = "<Leader>bl", postkeys = "<Leader>b" },
|
||||
{ mode = "n", keys = "<Leader>f", desc = "+Find" },
|
||||
{ mode = "n", keys = "<Leader>g", desc = "+Git" },
|
||||
{ mode = "n", keys = "<Leader>l", desc = "+LSP" },
|
||||
{ mode = "n", keys = "<Leader>r", desc = "+Replace" },
|
||||
{ mode = "n", keys = "<Leader>u", desc = "+UI & Config" },
|
||||
{ mode = "n", keys = "<Leader>un", desc = "+Noice" },
|
||||
{ mode = "n", keys = "<Leader>w", desc = "+Workspace" },
|
||||
{ mode = "n", keys = "<Leader>p", desc = "+ChatGPT" },
|
||||
{ mode = "v", keys = "<Leader>p", desc = "+ChatGPT" },
|
||||
{ mode = "n", keys = "<Leader>p", desc = "+ChatGPT" },
|
||||
},
|
||||
|
||||
-- Clue window settings
|
||||
window = {
|
||||
-- Floating window config
|
||||
config = {
|
||||
width = "auto",
|
||||
},
|
||||
-- Delay before showing clue window
|
||||
delay = 200,
|
||||
-- Keys to scroll inside the clue window
|
||||
scroll_down = "<C-d>",
|
||||
scroll_up = "<C-u>",
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
return {
|
||||
"mfussenegger/nvim-lint",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
local lint = require("lint")
|
||||
|
||||
lint.linters.gitlint.stdin = true
|
||||
lint.linters.gitlint.args = { "--contrib", "contrib-title-conventional-commits", "--msg-filename", "-" }
|
||||
|
||||
lint.linters_by_ft = {
|
||||
javascript = { "eslint_d" },
|
||||
typescript = { "eslint_d" },
|
||||
javascriptreact = { "eslint_d" },
|
||||
typescriptreact = { "eslint_d" },
|
||||
-- astro = { "eslint_d" },
|
||||
python = { "pyright" },
|
||||
sh = { "shellcheck" },
|
||||
NeogitCommitMessage = { "gitlint" },
|
||||
gitcommit = { "gitlint" },
|
||||
markdown = { "markdownlint" },
|
||||
}
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||
callback = function()
|
||||
require("lint").try_lint()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,149 +0,0 @@
|
|||
return {
|
||||
-- LSP Configuration & Plugins
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
-- Automatically install LSPs to stdpath for neovim
|
||||
{ "williamboman/mason.nvim" },
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
-- Additional lua configuration, makes nvim stuff amazing!
|
||||
{ "folke/neodev.nvim", opts = {} },
|
||||
},
|
||||
|
||||
config = function()
|
||||
-- LSP settings.
|
||||
local on_attach = function(_, bufnr)
|
||||
local nmap = function(keys, func, desc)
|
||||
if desc then
|
||||
desc = "LSP: " .. desc
|
||||
end
|
||||
|
||||
vim.keymap.set("n", keys, func, { buffer = bufnr, desc = desc })
|
||||
end
|
||||
|
||||
nmap("<leader>lr", vim.lsp.buf.rename, "Rename")
|
||||
nmap("<leader>la", vim.lsp.buf.code_action, "Code Action")
|
||||
nmap("<leader>ld", vim.lsp.buf.type_definition, "Go to type definition")
|
||||
nmap("<leader>lf", function()
|
||||
vim.lsp.buf.format()
|
||||
end, "Format")
|
||||
|
||||
nmap("gd", vim.lsp.buf.definition, "Go to definition")
|
||||
nmap("gr", require("telescope.builtin").lsp_references, "Goto References")
|
||||
nmap("gI", vim.lsp.buf.implementation, "Go to Implementation")
|
||||
|
||||
-- See `:help K` for why this keymap
|
||||
nmap("K", vim.lsp.buf.hover, "Hover Documentation")
|
||||
-- nmap("<C-k>", vim.lsp.buf.signature_help, "Signature Documentation")
|
||||
|
||||
-- Lesser used LSP functionality
|
||||
nmap("gD", vim.lsp.buf.declaration, "Goto Declaration")
|
||||
|
||||
nmap("<leader>lj", vim.diagnostic.goto_next, "Go to next diagnostic")
|
||||
nmap("<leader>lk", vim.diagnostic.goto_prev, "Go to prev diagnostic")
|
||||
|
||||
-- Create a command `:Format` local to the LSP buffer
|
||||
vim.api.nvim_buf_create_user_command(bufnr, "Format", function(_)
|
||||
vim.lsp.buf.format()
|
||||
end, { desc = "Format current buffer with LSP" })
|
||||
end
|
||||
|
||||
-- Enable the following language servers
|
||||
-- To see options and cofigurations: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||
local servers = {
|
||||
astro = {},
|
||||
bashls = {},
|
||||
cssls = {},
|
||||
dockerls = {},
|
||||
emmet_ls = {},
|
||||
html = {},
|
||||
pyright = {},
|
||||
rust_analyzer = {},
|
||||
sqlls = {},
|
||||
tsserver = {
|
||||
init_options = {
|
||||
preferences = {
|
||||
disableSuggestions = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
yamlls = {},
|
||||
lua_ls = {
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using
|
||||
-- (most likely LuaJIT in the case of Neovim)
|
||||
version = "LuaJIT",
|
||||
},
|
||||
-- Make the server aware of Neovim runtime files
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME,
|
||||
-- "${3rd}/luv/library"
|
||||
-- "${3rd}/busted/library",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- nvim-cmp supports additional completion capabilities, so broadcast that to servers
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities)
|
||||
|
||||
-- Ensure the servers above are installed
|
||||
local mason_lspconfig = require("mason-lspconfig")
|
||||
|
||||
mason_lspconfig.setup({
|
||||
ensure_installed = vim.tbl_keys(servers),
|
||||
})
|
||||
|
||||
mason_lspconfig.setup_handlers({
|
||||
function(server_name)
|
||||
local _border = "single"
|
||||
|
||||
local default_config = {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
handlers = {
|
||||
["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
|
||||
border = _border,
|
||||
}),
|
||||
["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
|
||||
border = _border,
|
||||
}),
|
||||
},
|
||||
}
|
||||
|
||||
require("lspconfig")[server_name].setup(
|
||||
vim.tbl_deep_extend("force", default_config, servers[server_name] or {})
|
||||
)
|
||||
end,
|
||||
})
|
||||
|
||||
vim.diagnostic.config({
|
||||
underline = true,
|
||||
update_in_insert = false,
|
||||
virtual_text = false,
|
||||
-- virtual_text = {
|
||||
-- spacing = 1,
|
||||
-- source = "if_many",
|
||||
-- prefix = " ●",
|
||||
-- suffix = " ",
|
||||
-- -- this will set set the prefix to a function that returns the diagnostics icon based on the severity
|
||||
-- -- this only works on a recent 0.10.0 build. Will be set to "●" when not supported
|
||||
-- -- prefix = "icons",
|
||||
-- },
|
||||
severity_sort = true,
|
||||
})
|
||||
|
||||
-- Customize gutter icons
|
||||
local signs = require("aleidk.constants").icons.diagnostics
|
||||
for type, icon in pairs(signs) do
|
||||
local hl = "DiagnosticSign" .. type
|
||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,107 +0,0 @@
|
|||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
opts = function()
|
||||
local icons = require("aleidk.constants").icons
|
||||
|
||||
local function diff_source()
|
||||
local gitsigns = vim.b.gitsigns_status_dict
|
||||
if gitsigns then
|
||||
return {
|
||||
added = gitsigns.added,
|
||||
modified = gitsigns.changed,
|
||||
removed = gitsigns.removed,
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
local function position_scrollbar(str)
|
||||
local sbar = { "▁▁", "▂▂", "▃▃", "▄▄", "▅▅", "▆▆", "▇▇", "██" }
|
||||
|
||||
local curr_line = vim.api.nvim_win_get_cursor(0)[1]
|
||||
local lines = vim.api.nvim_buf_line_count(0)
|
||||
local i = math.floor((curr_line - 1) / lines * #sbar) + 1
|
||||
return str .. " " .. sbar[i]
|
||||
end
|
||||
|
||||
return {
|
||||
options = {
|
||||
theme = "auto",
|
||||
globalstatus = true,
|
||||
disabled_filetypes = { statusline = { "dashboard", "alpha" } },
|
||||
component_separators = "",
|
||||
section_separators = "",
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {
|
||||
{
|
||||
"mode",
|
||||
padding = 0,
|
||||
fmt = function()
|
||||
return " "
|
||||
end,
|
||||
},
|
||||
},
|
||||
lualine_b = {},
|
||||
lualine_c = {
|
||||
{ "branch", icon = icons.git.branch },
|
||||
{
|
||||
"diff",
|
||||
symbols = {
|
||||
added = icons.git.added,
|
||||
modified = icons.git.modified,
|
||||
removed = icons.git.removed,
|
||||
},
|
||||
source = diff_source,
|
||||
},
|
||||
{
|
||||
"diagnostics",
|
||||
symbols = {
|
||||
error = icons.diagnostics.Error,
|
||||
warn = icons.diagnostics.Warn,
|
||||
info = icons.diagnostics.Info,
|
||||
hint = icons.diagnostics.Hint,
|
||||
},
|
||||
},
|
||||
{
|
||||
-- Macro recording status
|
||||
function()
|
||||
return require("noice").api.status.mode.get()
|
||||
end,
|
||||
cond = function()
|
||||
return package.loaded["noice"] and require("noice").api.status.mode.has()
|
||||
end,
|
||||
},
|
||||
},
|
||||
lualine_x = {
|
||||
{ "searchcount" },
|
||||
},
|
||||
lualine_y = {
|
||||
{ "location" },
|
||||
{
|
||||
"progress",
|
||||
fmt = position_scrollbar,
|
||||
separator = " ",
|
||||
padding = 0,
|
||||
},
|
||||
},
|
||||
lualine_z = {},
|
||||
},
|
||||
extensions = {
|
||||
"neo-tree",
|
||||
"lazy",
|
||||
"fugitive",
|
||||
"fzf",
|
||||
"man",
|
||||
"mason",
|
||||
"nvim-tree",
|
||||
"quickfix",
|
||||
"symbols-outline",
|
||||
"trouble",
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
return {
|
||||
"L3MON4D3/LuaSnip",
|
||||
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()
|
||||
return require("luasnip").jumpable(1) and "<Plug>luasnip-jump-next" or "<tab>"
|
||||
end,
|
||||
expr = true,
|
||||
silent = true,
|
||||
mode = "i",
|
||||
},
|
||||
{ "<tab>", function() require("luasnip").jump(1) end, mode = "s" },
|
||||
{ "<s-tab>", function() require("luasnip").jump(-1) end, mode = { "i", "s" } },
|
||||
},
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"epwalsh/obsidian.nvim",
|
||||
version = "*",
|
||||
lazy = true,
|
||||
ft = "markdown",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"hrsh7th/nvim-cmp",
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>fo",
|
||||
"<CMD>ObsidianSearch<CR>",
|
||||
desc = "Find note in vault",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
notes_subdir = "notes",
|
||||
open_app_foreground = false,
|
||||
workspaces = {
|
||||
{
|
||||
name = "personal",
|
||||
path = "~/Repos/Private/docs",
|
||||
},
|
||||
{
|
||||
name = "blog",
|
||||
path = "~/Repos/Projects/blog-content",
|
||||
},
|
||||
},
|
||||
finder_mappings = {
|
||||
new = "<C-a>",
|
||||
},
|
||||
completion = {
|
||||
-- Where to put new notes created from completion. Valid options are
|
||||
-- * "current_dir" - put new notes in same directory as the current buffer.
|
||||
-- * "notes_subdir" - put new notes in the default notes subdirectory.
|
||||
new_notes_location = "current_dir",
|
||||
-- Control how wiki links are completed with these (mutually exclusive) options:
|
||||
--
|
||||
-- 1. Whether to add the note ID during completion.
|
||||
-- E.g. "[[Foo" completes to "[[foo|Foo]]" assuming "foo" is the ID of the note.
|
||||
-- Mutually exclusive with 'prepend_note_path' and 'use_path_only'.
|
||||
prepend_note_id = false,
|
||||
-- 2. Whether to add the note path during completion.
|
||||
-- E.g. "[[Foo" completes to "[[notes/foo|Foo]]" assuming "notes/foo.md" is the path of the note.
|
||||
-- Mutually exclusive with 'prepend_note_id' and 'use_path_only'.
|
||||
prepend_note_path = true,
|
||||
-- 3. Whether to only use paths during completion.
|
||||
-- E.g. "[[Foo" completes to "[[notes/foo]]" assuming "notes/foo.md" is the path of the note.
|
||||
-- Mutually exclusive with 'prepend_note_id' and 'prepend_note_path'.
|
||||
use_path_only = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
return {
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"eslint_d",
|
||||
"shellcheck",
|
||||
"stylua",
|
||||
"blue",
|
||||
"prettierd",
|
||||
"markdownlint",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
return {
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
opts = {
|
||||
presets = {
|
||||
bottom_search = true,
|
||||
-- command_palette = true,
|
||||
long_message_to_split = true,
|
||||
inc_rename = true,
|
||||
},
|
||||
lsp = {
|
||||
override = {
|
||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||
["vim.lsp.util.stylize_markdown"] = true,
|
||||
["cmp.entry.get_documentation"] = true,
|
||||
},
|
||||
},
|
||||
routes = {
|
||||
{
|
||||
filter = {
|
||||
event = "msg_show",
|
||||
any = {
|
||||
{ find = "%d+L, %d+B" },
|
||||
{ find = "; after #%d+" },
|
||||
{ find = "; before #%d+" },
|
||||
},
|
||||
},
|
||||
view = "mini",
|
||||
},
|
||||
{
|
||||
filter = {
|
||||
event = "msg_show",
|
||||
kind = "search_count",
|
||||
},
|
||||
opts = { skip = true },
|
||||
},
|
||||
},
|
||||
views = {
|
||||
cmdline_popup = {
|
||||
position = {
|
||||
row = 5,
|
||||
col = "50%",
|
||||
},
|
||||
size = {
|
||||
width = 60,
|
||||
height = "auto",
|
||||
},
|
||||
},
|
||||
popupmenu = {
|
||||
relative = "editor",
|
||||
position = {
|
||||
row = 8,
|
||||
col = "50%",
|
||||
},
|
||||
size = {
|
||||
width = 60,
|
||||
height = 10,
|
||||
},
|
||||
border = {
|
||||
style = "rounded",
|
||||
padding = { 0, 1 },
|
||||
},
|
||||
win_options = {
|
||||
winhighlight = { Normal = "Normal", FloatBorder = "DiagnosticInfo" },
|
||||
},
|
||||
},
|
||||
notify = {
|
||||
enabled = false,
|
||||
},
|
||||
messages = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{
|
||||
"<S-Enter>",
|
||||
function() require("noice").redirect(vim.fn.getcmdline()) end,
|
||||
mode = "c",
|
||||
desc =
|
||||
"Redirect Cmdline"
|
||||
},
|
||||
{
|
||||
"<leader>unl",
|
||||
function() require("noice").cmd("last") end,
|
||||
desc =
|
||||
"Noice Last Message"
|
||||
},
|
||||
{
|
||||
"<leader>unh",
|
||||
function() require("noice").cmd("history") end,
|
||||
desc =
|
||||
"Noice History"
|
||||
},
|
||||
{ "<leader>una", function() require("noice").cmd("all") end, desc = "Noice All" },
|
||||
{ "<leader>und", function() require("noice").cmd("dismiss") end, desc = "Dismiss All" },
|
||||
{
|
||||
"<c-f>",
|
||||
function() if not require("noice.lsp").scroll(4) then return "<c-f>" end end,
|
||||
silent = true,
|
||||
expr = true,
|
||||
desc =
|
||||
"Scroll forward",
|
||||
mode = {
|
||||
"i", "n", "s" }
|
||||
},
|
||||
{
|
||||
"<c-b>",
|
||||
function() if not require("noice.lsp").scroll(-4) then return "<c-b>" end end,
|
||||
silent = true,
|
||||
expr = true,
|
||||
desc =
|
||||
"Scroll backward",
|
||||
mode = {
|
||||
"i", "n", "s" }
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
return {
|
||||
"anuvyklack/pretty-fold.nvim",
|
||||
opts = {
|
||||
sections = {
|
||||
left = {
|
||||
"+",
|
||||
function()
|
||||
return string.rep("-", vim.v.foldlevel)
|
||||
end,
|
||||
" ",
|
||||
"content",
|
||||
" ",
|
||||
"number_of_folded_lines",
|
||||
" ",
|
||||
function()
|
||||
return string.rep("-", vim.v.foldlevel)
|
||||
end,
|
||||
"+",
|
||||
},
|
||||
},
|
||||
fill_char = " ",
|
||||
|
||||
-- Possible values:
|
||||
-- "delete" : Delete all comment signs from the fold string.
|
||||
-- "spaces" : Replace all comment signs with equal number of spaces.
|
||||
-- false : Do nothing with comment signs.
|
||||
process_comment_signs = "delete",
|
||||
|
||||
-- List of patterns that will be removed from content foldtext section.
|
||||
stop_words = {
|
||||
"@brief%s*", -- (for C++) Remove '@brief' and all spaces after.
|
||||
},
|
||||
|
||||
matchup_patterns = {
|
||||
{ "{", "}" },
|
||||
{ "%(", ")" }, -- % to escape lua pattern char
|
||||
{ "%[", "]" }, -- % to escape lua pattern char
|
||||
},
|
||||
|
||||
ft_ignore = { "neorg" },
|
||||
},
|
||||
}
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"kevinhwang91/nvim-bqf",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
{
|
||||
"junegunn/fzf",
|
||||
build = function()
|
||||
vim.fn["fzf#install"]()
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local fn = vim.fn
|
||||
|
||||
function _G.qftf(info)
|
||||
local items
|
||||
local ret = {}
|
||||
-- The name of item in list is based on the directory of quickfix window.
|
||||
-- Change the directory for quickfix window make the name of item shorter.
|
||||
-- It's a good opportunity to change current directory in quickfixtextfunc :)
|
||||
--
|
||||
-- local alterBufnr = fn.bufname('#') -- alternative buffer is the buffer before enter qf window
|
||||
-- local root = getRootByAlterBufnr(alterBufnr)
|
||||
-- vim.cmd(('noa lcd %s'):format(fn.fnameescape(root)))
|
||||
--
|
||||
if info.quickfix == 1 then
|
||||
items = fn.getqflist({ id = info.id, items = 0 }).items
|
||||
else
|
||||
items = fn.getloclist(info.winid, { id = info.id, items = 0 }).items
|
||||
end
|
||||
local limit = 31
|
||||
local fnameFmt1, fnameFmt2 = "%-" .. limit .. "s", "…%." .. (limit - 1) .. "s"
|
||||
local validFmt = "%s │%5d:%-3d│%s %s"
|
||||
for i = info.start_idx, info.end_idx do
|
||||
local e = items[i]
|
||||
local fname = ""
|
||||
local str
|
||||
if e.valid == 1 then
|
||||
if e.bufnr > 0 then
|
||||
fname = fn.bufname(e.bufnr)
|
||||
if fname == "" then
|
||||
fname = "[No Name]"
|
||||
else
|
||||
fname = fname:gsub("^" .. vim.env.HOME, "~")
|
||||
end
|
||||
-- char in fname may occur more than 1 width, ignore this issue in order to keep performance
|
||||
if #fname <= limit then
|
||||
fname = fnameFmt1:format(fname)
|
||||
else
|
||||
fname = fnameFmt2:format(fname:sub(1 - limit))
|
||||
end
|
||||
end
|
||||
local lnum = e.lnum > 99999 and -1 or e.lnum
|
||||
local col = e.col > 999 and -1 or e.col
|
||||
local qtype = e.type == "" and "" or " " .. e.type:sub(1, 1):upper()
|
||||
str = validFmt:format(fname, lnum, col, qtype, e.text)
|
||||
else
|
||||
str = e.text
|
||||
end
|
||||
table.insert(ret, str)
|
||||
end
|
||||
return ret
|
||||
end
|
||||
|
||||
vim.o.qftf = "{info -> v:lua._G.qftf(info)}"
|
||||
|
||||
-- Adapt fzf's delimiter in nvim-bqf
|
||||
require("bqf").setup({
|
||||
filter = {
|
||||
fzf = {
|
||||
extra_opts = { "--bind", "ctrl-o:toggle-all", "--delimiter", "│" },
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
local toggle_qf = function()
|
||||
local qf_open = false
|
||||
for _, win in pairs(vim.fn.getwininfo()) do
|
||||
if win["quickfix"] == 1 then
|
||||
qf_open = true
|
||||
end
|
||||
end
|
||||
if qf_open == true then
|
||||
vim.cmd("cclose")
|
||||
return
|
||||
end
|
||||
if not vim.tbl_isempty(vim.fn.getqflist()) then
|
||||
vim.cmd("copen")
|
||||
end
|
||||
end
|
||||
|
||||
MAP("n", "<Leader>fQ", toggle_qf, "Toggle quickfix")
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
return {
|
||||
-- sessions
|
||||
"rmagatti/auto-session",
|
||||
config = function()
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
require("auto-session").setup({
|
||||
log_level = "error",
|
||||
auto_session_suppress_dirs = { "~/", "~/Downloads", "/" },
|
||||
bypass_session_save_file_types = {
|
||||
"NeogitStatus",
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
-- Move to windows with Ctrl and hjkl
|
||||
-- Resize to windows with Alt and hjkl
|
||||
-- Tmux aware
|
||||
return {
|
||||
"mrjones2014/smart-splits.nvim",
|
||||
opts = { ignored_filetypes = { "nofile", "quickfix", "qf", "prompt" }, ignored_buftypes = { "nofile" } },
|
||||
keys = {
|
||||
{
|
||||
"<C-h>",
|
||||
function()
|
||||
require("smart-splits").move_cursor_left()
|
||||
end,
|
||||
desc = "Move to left window",
|
||||
},
|
||||
{
|
||||
"<C-j>",
|
||||
function()
|
||||
require("smart-splits").move_cursor_down()
|
||||
end,
|
||||
desc = "Move to bottom window",
|
||||
},
|
||||
{
|
||||
"<C-k>",
|
||||
function()
|
||||
require("smart-splits").move_cursor_up()
|
||||
end,
|
||||
desc = "Move to upper window",
|
||||
},
|
||||
{
|
||||
"<C-l>",
|
||||
function()
|
||||
require("smart-splits").move_cursor_right()
|
||||
end,
|
||||
desc = "Move to right window",
|
||||
},
|
||||
{
|
||||
"<A-h>",
|
||||
function()
|
||||
require("smart-splits").resize_left()
|
||||
end,
|
||||
desc = "Move to left window",
|
||||
},
|
||||
{
|
||||
"<A-j>",
|
||||
function()
|
||||
require("smart-splits").resize_down()
|
||||
end,
|
||||
desc = "Move to bottom window",
|
||||
},
|
||||
{
|
||||
"<A-k>",
|
||||
function()
|
||||
require("smart-splits").resize_up()
|
||||
end,
|
||||
desc = "Move to upper window",
|
||||
},
|
||||
{
|
||||
"<A-l>",
|
||||
function()
|
||||
require("smart-splits").resize_right()
|
||||
end,
|
||||
desc = "Move to right window",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
return {
|
||||
"echasnovski/mini.surround",
|
||||
version = "*",
|
||||
opts = {},
|
||||
}
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
-- Fuzzy Finder (files, lsp, etc)
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
version = "*",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
{
|
||||
-- Blazingly Fast Fuzzy Finder Algorithm for Telescope
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "make",
|
||||
cond = function()
|
||||
return vim.fn.executable("make") == 1
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope-file-browser.nvim",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local actions = require("telescope.actions")
|
||||
local telescope = require("telescope")
|
||||
local builtin = require("telescope.builtin")
|
||||
|
||||
local opts = {
|
||||
defaults = {
|
||||
prompt_prefix = " ",
|
||||
selection_caret = " ",
|
||||
layout_strategy = "vertical",
|
||||
layout_config = { vertical = { height = 0.99, mirror = true, prompt_position = "top" } },
|
||||
mappings = {
|
||||
i = {
|
||||
["<c-u>"] = actions.preview_scrolling_up,
|
||||
["<c-d>"] = actions.preview_scrolling_down,
|
||||
["<C-j>"] = actions.move_selection_next,
|
||||
["<C-k>"] = actions.move_selection_previous,
|
||||
["<C-s>"] = actions.file_vsplit,
|
||||
["<C-v>"] = actions.file_split,
|
||||
["<ESC>"] = actions.close,
|
||||
["<C-q>"] = actions.send_to_qflist + actions.open_qflist,
|
||||
["<M-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
|
||||
["<c-t>"] = function(...)
|
||||
return require("trouble.providers.telescope").open_with_trouble(...)
|
||||
end,
|
||||
["<a-t>"] = function(...)
|
||||
return require("trouble.providers.telescope").open_selected_with_trouble(...)
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
telescope.setup(opts)
|
||||
|
||||
-- Enable telescope fzf native, if installed
|
||||
pcall(telescope.load_extension, "fzf")
|
||||
pcall(telescope.load_extension, "file_browser")
|
||||
|
||||
-- Find files
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>fe",
|
||||
":Telescope file_browser path=%:p:h select_buffer=true<CR>",
|
||||
{ desc = "File Explorer" }
|
||||
)
|
||||
vim.keymap.set("n", "<leader>fb", builtin.buffers, { desc = "Find buffers" })
|
||||
vim.keymap.set("n", "<leader>ff", builtin.find_files, { desc = "Find files" })
|
||||
vim.keymap.set("n", "<leader>fF", function()
|
||||
builtin.find_files({ hidden = true, no_ignore = true })
|
||||
end, { desc = "Find all files" })
|
||||
|
||||
-- Search inside files
|
||||
vim.keymap.set("n", "<leader>fw", builtin.grep_string, { desc = "Find word under cursor" })
|
||||
vim.keymap.set("n", "<leader>fW", builtin.live_grep, { desc = "Find word (live grep)" })
|
||||
|
||||
-- Help
|
||||
vim.keymap.set("n", "<leader>fc", builtin.command_history, { desc = "Find in commands history" })
|
||||
vim.keymap.set("n", "<leader>fC", builtin.commands, { desc = "Find a command" })
|
||||
vim.keymap.set("n", "<leader>fh", builtin.help_tags, { desc = "Find Help" })
|
||||
vim.keymap.set("n", "<leader>fk", builtin.keymaps, { desc = "Find Keymaps" })
|
||||
|
||||
-- Git
|
||||
vim.keymap.set("n", "<leader>gb", builtin.git_branches, { desc = "Change branch" })
|
||||
vim.keymap.set("n", "<leader>gc", builtin.git_bcommits, { desc = "Commits of buffer" })
|
||||
|
||||
-- Diagnosticos
|
||||
-- Disabled, handle by trouble
|
||||
-- vim.keymap.set("n", "<leader>fD", function()
|
||||
-- builtin.diagnostics({ bufnr = 0 })
|
||||
-- end, { desc = "Find diagnostics (Telescope)" })
|
||||
-- vim.keymap.set("n", "<leader>fD", function()
|
||||
-- builtin.diagnostics({ bufnr = nil })
|
||||
-- end, { desc = "Find diagnostics in workspace (Telescope)" })
|
||||
-- vim.keymap.set("n", "<leader>fz", builtin.spell_suggest, { desc = "Find spell suggestion" })
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
return {
|
||||
"folke/todo-comments.nvim",
|
||||
cmd = { "TodoTrouble", "TodoTelescope" },
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
config = true,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
||||
{ "<leader>ft", "<cmd>TodoTrouble<cr>", desc = "Find todos (Trouble)" },
|
||||
{ "<leader>fT", "<cmd>TodoTelescope<cr>", desc = "Find todos (Telescope)" },
|
||||
},
|
||||
}
|
||||
|
|
@ -1,110 +0,0 @@
|
|||
return {
|
||||
-- Highlight, edit, and navigate code
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
"windwp/nvim-ts-autotag",
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
},
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
require("nvim-treesitter.configs").setup({
|
||||
-- Add languages to be installed here that you want installed for treesitter
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
"cpp",
|
||||
"go",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"regex",
|
||||
"rust",
|
||||
"sql",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
},
|
||||
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
||||
auto_install = true,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<c-space>",
|
||||
node_incremental = "<c-space>",
|
||||
scope_incremental = "<c-s>",
|
||||
node_decremental = "<M-space>",
|
||||
},
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
["aa"] = "@parameter.outer",
|
||||
["ia"] = "@parameter.inner",
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ac"] = "@class.outer",
|
||||
["ic"] = "@class.inner",
|
||||
},
|
||||
},
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true, -- whether to set jumps in the jumplist
|
||||
goto_next_start = {
|
||||
["]m"] = "@function.outer",
|
||||
["]]"] = "@class.outer",
|
||||
},
|
||||
goto_next_end = {
|
||||
["]M"] = "@function.outer",
|
||||
["]["] = "@class.outer",
|
||||
},
|
||||
goto_previous_start = {
|
||||
["[m"] = "@function.outer",
|
||||
["[["] = "@class.outer",
|
||||
},
|
||||
goto_previous_end = {
|
||||
["[M"] = "@function.outer",
|
||||
["[]"] = "@class.outer",
|
||||
},
|
||||
},
|
||||
swap = {
|
||||
enable = true,
|
||||
swap_next = {
|
||||
["<leader>a"] = "@parameter.inner",
|
||||
},
|
||||
swap_previous = {
|
||||
["<leader>A"] = "@parameter.inner",
|
||||
},
|
||||
},
|
||||
},
|
||||
autotag = { enable = true },
|
||||
context_commentstring = { enable = true, enable_autocmd = false },
|
||||
})
|
||||
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
|
||||
-- Uncoment this line to disable auto folding on file open
|
||||
vim.cmd("set nofoldenable")
|
||||
|
||||
-- TODO: remove this when blade treesitter is added to nvim-treesitter repo
|
||||
-- Also remove the "config/nvim/after/queries/blade" folder.
|
||||
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
|
||||
parser_config.blade = {
|
||||
install_info = {
|
||||
url = "https://github.com/EmranMR/tree-sitter-blade",
|
||||
files = { "src/parser.c" },
|
||||
branch = "main",
|
||||
},
|
||||
filetype = "blade",
|
||||
}
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
return {
|
||||
"folke/trouble.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
cmd = { "TroubleToggle", "Trouble" },
|
||||
keys = {
|
||||
{ "<leader>fq", "<CMD>TroubleToggle<CR>", desc = "Toggle trouble" },
|
||||
{ "<leader>fd", "<CMD>TroubleToggle workspace_diagnostics<CR>", desc = "Find diagnostics" },
|
||||
{
|
||||
"<leader>fD",
|
||||
"<CMD>TroubleToggle document_diagnostics<CR>",
|
||||
desc = "Find diagnostics in workspace",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("trouble").setup({
|
||||
mode = "document_diagnostics",
|
||||
action_keys = {
|
||||
open_split = "s",
|
||||
open_vsplit = "v",
|
||||
open_tab = "t",
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"ckolkey/ts-node-action",
|
||||
dependencies = { "nvim-treesitter" },
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("ts-node-action").setup({})
|
||||
|
||||
vim.keymap.set({ "n" }, "<leader>lA", require("ts-node-action").node_action, { desc = "Node Action" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"Wansmer/treesj",
|
||||
cmd = { "TSJToggle" },
|
||||
keys = {
|
||||
{ "<leader>lm", "<CMD>TSJToggle<CR>", desc = "Toggle treesitter join" },
|
||||
},
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||
opts = {
|
||||
use_default_keymaps = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue