Compare commits

...

4 Commits

40 changed files with 683 additions and 691 deletions

View File

@@ -1,6 +1 @@
tags
test.sh
.luarc.json
nvim
lazy-lock.json
session.vim

View File

@@ -1,3 +1,4 @@
-- luacheck: globals vim
local key = vim.api.nvim_set_keymap
local remap = { noremap = true, silent = true }

View File

@@ -0,0 +1,68 @@
{
"LuaSnip": { "branch": "master", "commit": "ea7d7ea510c641c4f15042becd27f35b3e5b3c2b" },
"barbecue.nvim": { "branch": "main", "commit": "cd7e7da622d68136e13721865b4d919efd6325ed" },
"bufdelete.nvim": { "branch": "master", "commit": "07d1f8ba79dec59d42b975a4df1c732b2e4e37b4" },
"catppuccin": { "branch": "main", "commit": "2e3e5ebcdc24ef0d5b14a0a999dbbe7936512c46" },
"close-buffers.nvim": { "branch": "master", "commit": "3acbcad1211572342632a6c0151f839e7dead27f" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-calc": { "branch": "main", "commit": "ce91d14d2e7a8b3f6ad86d85e34d41c1ae6268d9" },
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
"cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" },
"cmp-look": { "branch": "master", "commit": "b39c50bcdf6199dddda56adc466c2bd9c951a960" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
"comment-box.nvim": { "branch": "main", "commit": "dd1a48f8d06102e9b87ae1e0069bc365c006979b" },
"dressing.nvim": { "branch": "master", "commit": "c7b035de7f91bb6b62b4308f105c56d1a968b8c5" },
"fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" },
"friendly-snippets": { "branch": "main", "commit": "00e191fea2cfbbdd378243f35b5953296537a116" },
"gitsigns.nvim": { "branch": "main", "commit": "d927caa075df63bf301d92f874efb72fd22fd3b4" },
"harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" },
"lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" },
"lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "dfdd771b792fbb4bad8e057d72558255695aa1a7" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "6148b51db945b55b3b725da39eaea6441e59dff8" },
"mason.nvim": { "branch": "main", "commit": "0942198fb9a998b6ccee36fb8dd7495eb8ba659c" },
"mini.nvim": { "branch": "main", "commit": "296ebbbd3e5ba5e43f5125efe18ad76fe3b632cc" },
"neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" },
"neodev.nvim": { "branch": "main", "commit": "183f5a7357397260b631d6cccceccc3621b50f78" },
"neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" },
"nui.nvim": { "branch": "main", "commit": "aa1b4c1e05983ff7debd2b4b2788651db099de2f" },
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
"nvim-dap": { "branch": "master", "commit": "31e1ece773e10448dcb616d5144290946a6264b7" },
"nvim-dap-go": { "branch": "main", "commit": "1b508e9db330108d3b5d62a6d9cc01fe6bbdd4e0" },
"nvim-dap-ui": { "branch": "master", "commit": "85b16ac2309d85c88577cd8ee1733ce52be8227e" },
"nvim-lspconfig": { "branch": "master", "commit": "a27356f1ef9c11e1f459cc96a3fcac5c265e72d6" },
"nvim-navic": { "branch": "master", "commit": "9c89730da6a05acfeb6a197e212dfadf5aa60ca0" },
"nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" },
"nvim-regexplainer": { "branch": "main", "commit": "4250c8f3c1307876384e70eeedde5149249e154f" },
"nvim-surround": { "branch": "main", "commit": "0d6882635817a2677749a330127d12ac30a4f3c8" },
"nvim-treesitter": { "branch": "master", "commit": "17b943e7c5cc2b2db3ac7b5720fbd42e75a00d8d" },
"nvim-treesitter-context": { "branch": "master", "commit": "31692b26d76ff1f7c6e0ab51814dd55e7417e96c" },
"nvim-web-devicons": { "branch": "master", "commit": "cfc8824cc1db316a276b36517f093baccb8e799a" },
"nvim-window-picker": { "branch": "main", "commit": "1b1bb834b0acb9eebb11a61664efc665757f1ba2" },
"plenary.nvim": { "branch": "master", "commit": "0dbe561ae023f02c2fb772b879e905055b939ce3" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"refactoring.nvim": { "branch": "master", "commit": "2ec9bc0fb5f3c8c6a0f776f0159dd2a3b1663554" },
"restoreview": { "branch": "main", "commit": "03d00d59a9ba640db6b44192ed0fcc9d7261dcd2" },
"schemastore.nvim": { "branch": "main", "commit": "a6759df4dcfc052246ee7a6cccfdb37d2180d617" },
"smartcolumn.nvim": { "branch": "main", "commit": "4aa00ad766f3c0f0e2561e0eb42df3ea3743c135" },
"stickybuf.nvim": { "branch": "master", "commit": "4c667bc837e5e3fec5a8857ee99f1a229fc76df9" },
"symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" },
"tabnine": { "branch": "master", "commit": "dcca6d2f9e8bbcde36aab87b9b87890810e4056d" },
"telescope-file-browser.nvim": { "branch": "master", "commit": "ad7b637c72549713b9aaed7c4f9c79c62bcbdff0" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" },
"telescope.nvim": { "branch": "master", "commit": "2c1ed33a6f6f2db3b69f5421f6b405eda1b07748" },
"trouble.nvim": { "branch": "main", "commit": "3f85d8ed30e97ceeddbbcf80224245d347053711" },
"twilight.nvim": { "branch": "main", "commit": "a4843e6e67092a1e6fa9666f02bf0ab59174c1df" },
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
"vim-vsnip": { "branch": "master", "commit": "7753ba9c10429c29d25abfd11b4c60b76718c438" },
"vim-vsnip-integ": { "branch": "master", "commit": "1914e72cf3de70df7f5dde476cd299aba2440aef" },
"vim-wakatime": { "branch": "master", "commit": "0d2efa2daff34b27b0d227d4c3b136811c93db93" },
"which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" },
"wilder.nvim": { "branch": "master", "commit": "679f348dc90d80ff9ba0e7c470c40a4d038dcecf" }
}

View File

@@ -46,7 +46,7 @@ wk.register({
},
},
g = {
name = "Goto buffer",
name = "[g]oto buffer",
["1"] = { "<cmd>buffer! 1<cr>", "Buffer 1" },
["2"] = { "<cmd>buffer! 2<cr>", "Buffer 2" },
["3"] = { "<cmd>buffer! 3<cr>", "Buffer 3" },
@@ -67,9 +67,7 @@ wk.register({
p = { ":lua vim.diagnostic.goto_prev()<CR>", "[D]iagnostics: [p]rev" },
},
e = {
function()
vim.cmd("Neotree focus source=filesystem position=left")
end,
function() vim.cmd("Neotree focus source=filesystem position=left") end,
"Toggle the sidebar tree of the root folder.",
},
f = {
@@ -79,6 +77,13 @@ wk.register({
-- Find recursively a text across the root folder subfiles.
g = { ':lua require("telescope.builtin").live_grep()<cr>', "[f]ind text with [g]rep" },
},
G = {
-- defined in plugins/gitsigns.lua
name = "Git",
b = {
name = "blame",
},
},
h = {
name = "[h]arpoon",
a = { "<cmd>lua require('harpoon.mark').add_file()<cr>", "[h]arpoon: [A]dd file" },
@@ -92,7 +97,7 @@ wk.register({
},
--- Remap debugging to "H" from LV default of "h"
H = {
name = "[H]elp/Conceal/Telescope",
name = "[H]elp/Conceal/Treesitter",
c = {
name = "[c]onceal",
h = { ":set conceallevel=1<cr>", "hide/conceal" },
@@ -118,6 +123,10 @@ wk.register({
q = { ":qa<cr>", "[q]uit: [q]uit all" },
f = { ":qa!<cr>", "[q]uit: all with [f]orce" },
},
r = {
-- defined in plugins/refactoring-nvim.lua
name = "[r]efactor",
},
t = {
name = "[t]elescope",
-- Find recursively TODOs, NOTEs, FIXITs, ... across the root folder subfiles.

View File

@@ -1,4 +1,5 @@
-- Completion for snippets.
-- luacheck: globals vim CAPABILITIES
CAPABILITIES = vim.lsp.protocol.make_client_capabilities()
CAPABILITIES = require("cmp_nvim_lsp").default_capabilities(CAPABILITIES)
CAPABILITIES.textDocument.completion.completionItem.snippetSupport = true

View File

@@ -1,5 +1,4 @@
local option = vim.api.nvim_set_option
local set = vim.api.nvim_set_var
-- luacheck: globals vim
-- Fix moving through lines 'gk' and 'gj'
vim.wo.linebreak = true
@@ -103,7 +102,7 @@ vim.o.spelllang = "en_gb"
vim.bo.spelllang = "en_gb"
-- Global statusline.
vim.opt.laststatus = 3
vim.opt.laststatus = 2
-- When "on" the commands listed below move the cursor to the first non-blank
-- of the line. When off the cursor is kept in the same column (if possible).
@@ -123,31 +122,37 @@ vim.o.shortmess = vim.o.shortmess .. "c"
-- Menu Transparency.
vim.go.pumblend = 10
--------------------Variables-----------------
-- ╭──────────────────────────────────────────────────────────╮
-- │ Variables │
-- ╰──────────────────────────────────────────────────────────╯
set("one_allow_itali:set cursorlinec:set cursorlines", 1)
set("do_filetype_lua", 1)
set("MRU_File", "~/.cache/vim_mru_files")
vim.api.nvim_set_var("one_allow_itali:set cursorlinec:set cursorlines", 1)
vim.api.nvim_set_var("do_filetype_lua", 1)
vim.api.nvim_set_var("MRU_File", "~/.cache/vim_mru_files")
--------------------API------------------------
-- ╭──────────────────────────────────────────────────────────╮
-- │ API │
-- ╰──────────────────────────────────────────────────────────╯
-- Change title accordingly.
-- option('title', true)
vim.api.nvim_set_option("title", true)
-- Set clipboard to be global across the system
option("clipboard", "unnamedplus")
vim.api.nvim_set_option("clipboard", "unnamedplus")
-- Basic fold column
option("foldcolumn", "1")
vim.api.nvim_set_option("foldcolumn", "1")
-- Set dictionary to language spell
option("dictionary", "/usr/share/dict/words")
vim.api.nvim_set_option("dictionary", "/usr/share/dict/words")
-- Wildignore for when opening files :0
option("wildignore", "*/tmp*/,*/node_modules/*,_site,*/__pycache__/,*/venv/*,*/target/*,*/.vim$,~$,*/.log")
vim.api.nvim_set_option(
"wildignore",
"*/tmp*/,*/node_modules/*,_site,*/__pycache__/,*/venv/*,*/target/*,*/.vim$,~$,*/.log"
)
-- Folding
option("foldmethod", "syntax")
-- File format for neovim reading
option("fileformat", "unix")
vim.api.nvim_set_option("foldmethod", "syntax")
vim.api.nvim_set_option('foldenable', false)
vim.api.nvim_set_option('foldminlines', 5)

View File

@@ -1 +0,0 @@
return { "kazhala/close-buffers.nvim" }

View File

@@ -1,4 +0,0 @@
return {
"LudoPinelli/comment-box.nvim",
opts = {},
}

View File

@@ -1,29 +0,0 @@
return {
"anuvyklack/fold-preview.nvim",
dependencies = { "anuvyklack/keymap-amend.nvim", "ray-x/lsp_signature.nvim" },
config = function()
local fp = require("fold-preview")
local map = require("fold-preview").mapping
local keymap = vim.keymap
keymap.amend = require("keymap-amend")
fp.setup({
default_keybindings = false,
-- another settings
})
keymap.amend("n", "K", function(original)
if not fp.show_preview() then original() end
-- or
-- if not fp.toggle_preview() then original() end
-- to close preview on second press on K.
end)
keymap.amend("n", "h", map.close_preview_open_fold)
keymap.amend("n", "l", map.close_preview_open_fold)
keymap.amend("n", "zo", map.close_preview)
keymap.amend("n", "zO", map.close_preview)
keymap.amend("n", "zc", map.close_preview_without_defer)
keymap.amend("n", "zR", map.close_preview)
keymap.amend("n", "zM", map.close_preview_without_defer)
end,
}

View File

@@ -37,19 +37,19 @@ return {
end, { expr = true })
-- Actions
map("n", "<leader>hs", gs.stage_hunk, { desc = "Stage Hunk" })
map("n", "<leader>hr", gs.reset_hunk, { desc = "Reset Hunk" })
map("v", "<leader>hs", function() gs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) end)
map("v", "<leader>hr", function() gs.reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) end)
map("n", "<leader>hS", gs.stage_buffer, { desc = "Stage Buffer" })
map("n", "<leader>hu", gs.undo_stage_hunk, { desc = "Undo Stage Hunk" })
map("n", "<leader>hR", gs.reset_buffer, { desc = "Reset Buffer" })
map("n", "<leader>hp", gs.preview_hunk, { desc = "Preview Hunk" })
map("n", "<leader>hb", function() gs.blame_line({ full = true }) end, { desc = "Blame Line" })
map("n", "<leader>tb", gs.toggle_current_line_blame, { desc = "Toggle Current Line Blame" })
map("n", "<leader>hd", gs.diffthis, { desc = "Diff This" })
map("n", "<leader>hD", function() gs.diffthis("~") end)
map("n", "<leader>td", gs.toggle_deleted, { desc = "Toggle Deleted" })
map("n", "<leader>Ghs", gs.stage_hunk, { desc = "Stage Hunk" })
map("n", "<leader>Ghr", gs.reset_hunk, { desc = "Reset Hunk" })
map("v", "<leader>Ghs", function() gs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) end)
map("v", "<leader>Ghr", function() gs.reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) end)
map("n", "<leader>GhS", gs.stage_buffer, { desc = "Stage Buffer" })
map("n", "<leader>Ghu", gs.undo_stage_hunk, { desc = "Undo Stage Hunk" })
map("n", "<leader>GhR", gs.reset_buffer, { desc = "Reset Buffer" })
map("n", "<leader>Ghp", gs.preview_hunk, { desc = "Preview Hunk" })
map("n", "<leader>Gbl", function() gs.blame_line({ full = true }) end, { desc = "Blame Line" })
map("n", "<leader>Gbt", gs.toggle_current_line_blame, { desc = "Toggle Current Line Blame" })
map("n", "<leader>Ghd", gs.diffthis, { desc = "Diff This" })
map("n", "<leader>GhD", function() gs.diffthis("~") end)
map("n", "<leader>Gtd", gs.toggle_deleted, { desc = "Toggle Deleted" })
-- Text object
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>")

View File

@@ -1 +0,0 @@
return { "ThePrimeagen/harpoon" }

View File

@@ -1,70 +0,0 @@
-- Floating statuslines for Neovim
-- https://github.com/b0o/incline.nvim
--
-- Lightweight floating statuslines, best used with
-- Neovim's global statusline (set laststatus=3).
return {
"b0o/incline.nvim",
config = {
debounce_threshold = {
falling = 50,
rising = 0,
},
hide = {
cursorline = true,
focused_win = false,
only_win = true,
},
highlight = {
groups = {
InclineNormal = {
default = true,
group = "NormalFloat",
},
InclineNormalNC = {
default = true,
group = "NormalFloat",
},
},
},
ignore = {
buftypes = "special",
filetypes = {},
floating_wins = true,
unlisted_buffers = true,
wintypes = "special",
},
render = "basic",
window = {
margin = {
horizontal = 1,
vertical = 1,
},
options = {
signcolumn = "no",
wrap = false,
},
padding = 1,
padding_char = " ",
placement = {
horizontal = "right",
vertical = "top",
},
width = "fit",
winhighlight = {
active = {
EndOfBuffer = "None",
Normal = "InclineNormal",
Search = "None",
},
inactive = {
EndOfBuffer = "None",
Normal = "InclineNormalNC",
Search = "None",
},
},
zindex = 10,
},
},
}

View File

@@ -1,28 +1,24 @@
-- luacheck: globals vim
return {
--
-- Menu
--
-- Icons on menu
"onsails/lspkind-nvim",
-- plenary: full; complete; entire; absolute; unqualified.
-- All the lua functions I don't want to write twice.
-- https://github.com/nvim-lua/plenary.nvim
{ "nvim-lua/plenary.nvim", lazy = true },
-- Restore folds and cursor position
"senderle/restoreview",
--
-- Appearance
--
-- lua `fork` of vim-web-devicons for neovim
-- https://github.com/nvim-tree/nvim-web-devicons
{ "kyazdani42/nvim-web-devicons" },
-- The theme of choise, catppuccin
---- https://github.com/catppuccin/nvim
-- https://github.com/catppuccin/nvim
{
"catppuccin/nvim",
name = "catppuccin",
priority = 10000,
enabled = true,
lazy = false,
config = function()
vim.cmd.colorscheme("catppuccin")
end,
config = function() vim.cmd.colorscheme("catppuccin") end,
opts = {
flavour = "mocha",
transparent_background = true,
@@ -34,7 +30,8 @@ return {
integrations = {
aerial = true,
barbecue = {
dim_dirname = true, -- directory name is dimmed by default
-- directory name is dimmed by default
dim_dirname = true,
bold_basename = true,
dim_context = false,
alt_background = false,
@@ -50,7 +47,6 @@ return {
mason = true,
neotree = true,
notify = true,
nvimtree = false,
native_lsp = {
enabled = true,
virtual_text = {
@@ -73,9 +69,8 @@ return {
symbols_outline = true,
telescope = {
enabled = true,
style = "catppuccin"
style = "catppuccin",
},
ts_rainbow = true,
treesitter = true,
lsp_trouble = true,
which_key = true,
@@ -83,16 +78,173 @@ return {
},
},
"rcarriga/nvim-notify",
-- Notifications as a popup
-- https://github.com/rcarriga/nvim-notify
{
"rcarriga/nvim-notify",
keys = {
{
"<leader>un",
function() require("notify").dismiss({ silent = true, pending = true }) end,
desc = "Dismiss all Notifications",
},
},
opts = {
timeout = 3000,
max_height = function() return math.floor(vim.o.lines * 0.75) end,
max_width = function() return math.floor(vim.o.columns * 0.75) end,
},
init = function() vim.notify = require("notify") end,
},
-- vscode-like pictograms for neovim lsp completion items
-- https://github.com/onsails/lspkind.nvim
{ "onsails/lspkind-nvim" },
-- Save and restore Vim views automatically
-- https://github.com/senderle/restoreview
{ "senderle/restoreview" },
-- Create key bindings that stick. WhichKey is a lua plugin for Neovim that
-- displays a popup with possible keybindings of the command you started typing.
-- https://github.com/folke/which-key.nvim
{
"folke/which-key.nvim",
enabled = true,
lazy = false,
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
end,
opts = {
plugins = { spelling = true, marks = true, registers = true },
},
},
-- Neovim plugin to improve the default vim.ui interfaces
-- https://github.com/stevearc/dressing.nvim
{
"stevearc/dressing.nvim",
lazy = true,
init = function()
---@diagnostic disable-next-line: duplicate-set-field
vim.ui.select = function(...)
require("lazy").load({ plugins = { "dressing.nvim" } })
return vim.ui.select(...)
end
---@diagnostic disable-next-line: duplicate-set-field
vim.ui.input = function(...)
require("lazy").load({ plugins = { "dressing.nvim" } })
return vim.ui.input(...)
end
end,
},
-- Add/change/delete surrounding delimiter pairs with ease.
-- https://github.com/kylechui/nvim-surround
{
--[[
Old text Command New text
------------------------------------------------------------------
surround_words ysiw) (surround_words)
make strings ys$" "make strings"
[delete ar*ound me!] ds] delete around me!
"change quot*es" cs'" "change quotes"
<b>or tag* types</b> csth1<CR> <h1>or tag types</h1>
delete(functi*on calls) dsf function calls
]]
"kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use `main` branch for the latest features
event = "VeryLazy",
config = function()
require("nvim-surround").setup()
end,
},
-- A tree like view for symbols in Neovim using the LSP.
-- https://github.com/simrat39/symbols-outline.nvim
{
"simrat39/symbols-outline.nvim",
cmd = "SymbolsOutline",
keys = { { "<leader>bs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
opts = {
-- add your options that should be passed to the setup() function here
position = "right",
},
},
-- Getting you where you want with the fewest keystrokes.
-- https://github.com/ThePrimeagen/harpoon
{ "ThePrimeagen/harpoon" },
-- A Neovim plugin hiding your colorcolumn when unneeded.
-- https://github.com/m4xshen/smartcolumn.nvim
{
"m4xshen/smartcolumn.nvim",
opts = {
colorcolumn = { "80", "100", "120" },
disabled_filetypes = { "help", "text", "markdown", "json", "lazy", "starter", "neo-tree" },
},
},
-- Status information for LSP.
"j-hui/fidget.nvim",
-- https://github.com/j-hui/fidget.nvim
{ "j-hui/fidget.nvim" },
-- Close buffer without messing up with the window.
"famiu/bufdelete.nvim",
-- https://github.com/famiu/bufdelete.nvim
{ "famiu/bufdelete.nvim" },
"nyoom-engineering/oxocarbon.nvim",
-- Delete multiple vim buffers based on different conditions
-- https://github.com/kazhala/close-buffers.nvim
{ "kazhala/close-buffers.nvim" },
-- JSONLS
"b0o/schemastore.nvim",
-- https://github.com/b0o/schemastore.nvim
{ "b0o/schemastore.nvim" },
-- sleuth.vim: Heuristically set buffer options
-- https://github.com/tpope/vim-sleuth
{ "tpope/vim-sleuth" },
-- Neovim plugin for locking a buffer to a window
-- https://github.com/stevearc/stickybuf.nvim
{ "stevearc/stickybuf.nvim", opts = {} },
-- Describe the regexp under the cursor
-- https://github.com/bennypowers/nvim-regexplainer
{
"bennypowers/nvim-regexplainer",
requires = {
"nvim-treesitter/nvim-treesitter",
"MunifTanjim/nui.nvim",
},
opts = {
-- automatically show the explainer when the cursor enters a regexp
auto = true,
},
},
-- Clarify and beautify your comments using boxes and lines.
-- https://github.com/LudoPinelli/comment-box.nvim
{ "LudoPinelli/comment-box.nvim", opts = {} },
-- Tabnine Client for Neovim
-- https://github.com/codota/tabnine-nvim
{
"codota/tabnine-nvim",
name = "tabnine",
build = vim.loop.os_uname().sysname == "Windows_NT" and "pwsh.exe -file .\\dl_binaries.ps1" or "./dl_binaries.sh",
cmd = { "TabnineStatus", "TabnineDisable", "TabnineEnable", "TabnineToggle" },
event = "User",
opts = { accept_keymap = "<C-e>" },
},
-- Vim plugin for automatic time tracking and metrics generated from your programming activity.
-- https://github.com/wakatime/vim-wakatime
{
"wakatime/vim-wakatime",
lazy = false,
enabled = true,
},
}

View File

@@ -1,9 +0,0 @@
return {
"mrjones2014/legendary.nvim",
-- since legendary.nvim handles all your keymaps/commands,
-- its recommended to load legendary.nvim before other plugins
priority = 10000,
lazy = false,
-- sqlite is only needed if you want to use frecency sorting
-- dependencies = { 'kkharji/sqlite.lua' }
}

View File

@@ -1,36 +0,0 @@
-- Signs for built-in marks.
return {
"chentoast/marks.nvim",
config = {
-- whether to map keybinds or not. default true
default_mappings = true,
-- which builtin marks to show. default {}
builtin_marks = { ".", "<", ">", "^" },
-- whether movements cycle back to the beginning/end of buffer. default true
cyclic = true,
-- whether the shada file is updated after modifying uppercase marks. default false
force_write_shada = false,
-- how often (in ms) to redraw signs/recompute mark positions.
-- higher values will have better performance but may cause visual lag,
-- while lower values may cause performance penalties. default 150.
refresh_interval = 250,
-- sign priorities for each type of mark - builtin marks, uppercase marks, lowercase
-- marks, and bookmarks.
-- can be either a table with all/none of the keys, or a single number, in which case
-- the priority applies to all marks.
-- default 10.
sign_priority = { lower = 10, upper = 15, builtin = 8, bookmark = 20 },
-- disables mark tracking for specific filetypes. default {}
excluded_filetypes = {},
-- marks.nvim allows you to configure up to 10 bookmark groups, each with its own
-- sign/virttext. Bookmarks can be used to group together positions and quickly move
-- across multiple buffers. default sign is '!@#$%^&*()' (from 0 to 9), and
-- default virt_text is "".
bookmark_0 = {
sign = "",
virt_text = "hello world",
},
mappings = {},
},
}

View File

@@ -1,4 +1,6 @@
-- File-tree manager.
-- https://github.com/nvim-neo-tree/neo-tree.nvim
-- luacheck: globals vim
-- Unless you are still migrating, remove the deprecated commands from v1.x
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
@@ -7,7 +9,7 @@ return {
"nvim-neo-tree/neo-tree.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"kyazdani42/nvim-web-devicons", -- not strictly required, but recommended
"kyazdani42/nvim-web-devicons",
"MunifTanjim/nui.nvim",
{
-- only needed if you want to use the commands with "_with_window_picker" suffix
@@ -39,13 +41,17 @@ return {
vim.fn.sign_define("DiagnosticSignHint", { text = "󰌵", texthl = "DiagnosticSignHint" })
require("neo-tree").setup({
close_if_last_window = true, -- Close Neo-tree if it is the last window left in the tab
popup_border_style = "rounded", -- "double", "none", "rounded", "shadow", "single" or "solid"
-- Close Neo-tree if it is the last window left in the tab
close_if_last_window = true,
-- "double", "none", "rounded", "shadow", "single" or "solid"
popup_border_style = "rounded",
enable_git_status = true,
enable_diagnostics = true,
enable_normal_mode_for_inputs = false, -- Enable normal mode for input dialogs.
-- Enable normal mode for input dialogs.
enable_normal_mode_for_inputs = false,
open_files_do_not_replace_types = { "terminal", "trouble", "qf" }, -- when opening files, do not use windows containing these filetypes or buftypes
-- when opening files, do not use windows containing these filetypes or buftypes
open_files_do_not_replace_types = { "terminal", "trouble", "qf" },
-- popup_border_style is for input and confirmation dialogs.
-- Configurtaion of floating window is done in the individual source sections.
@@ -53,13 +59,20 @@ return {
close_floats_on_escape_key = true,
default_source = "filesystem",
git_status_async = true,
log_level = "info", -- "trace", "debug", "info", "warn", "error", "fatal"
log_to_file = false, -- true, false, "/path/to/file.log", use :NeoTreeLogs to show the file
open_files_in_last_window = true, -- false = open files in top left window
resize_timer_interval = 100, -- in ms, needed for containers to redraw right aligned and faded content
sort_case_insensitive = true, -- used when sorting files and directories in the tree
use_popups_for_input = false, -- If false, inputs will use vim.ui.input() instead of custom floats.
sort_function = nil, -- use a custom function for sorting files and directories in the tree
-- "trace", "debug", "info", "warn", "error", "fatal"
log_level = "info",
-- true, false, "/path/to/file.log", use :NeoTreeLogs to show the file
log_to_file = false,
-- false = open files in top left window
open_files_in_last_window = true,
-- in ms, needed for containers to redraw right aligned and faded content
resize_timer_interval = 100,
-- used when sorting files and directories in the tree
sort_case_insensitive = true,
-- If false, inputs will use vim.ui.input() instead of custom floats.
use_popups_for_input = false,
-- use a custom function for sorting files and directories in the tree
sort_function = nil,
event_handlers = {
-- {
@@ -121,14 +134,16 @@ return {
},
indent = {
indent_size = 2,
padding = 1, -- extra padding on left hand side
-- extra padding on left hand side
padding = 1,
-- indent guides
with_markers = true,
indent_marker = "",
last_indent_marker = "",
highlight = "NeoTreeIndentMarker",
-- expander config, needed for nesting files
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
-- if nil and file nesting is enabled, will enable expanders
with_expanders = true,
expander_collapsed = "",
expander_expanded = "",
expander_highlight = "NeoTreeExpander",
@@ -137,7 +152,8 @@ return {
folder_closed = "",
folder_open = "",
folder_empty = "-",
-- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there
-- The next two settings are only a fallback,
-- if you use nvim-web-devicons and configure default icons there
-- then these will never be used.
default = "*",
highlight = "NeoTreeFileIcon",
@@ -154,10 +170,10 @@ return {
git_status = {
symbols = {
-- Change type
added = "˖", -- or "✚", but this is redundant info if you use git_status_colors on the name
modified = "±", -- or "", but this is redundant info if you use git_status_colors on the name
deleted = "", -- this can only be used in the git_status source
renamed = "", -- this can only be used in the git_status source
added = "˖",
modified = "±",
deleted = "",
renamed = "",
-- Status type
untracked = "?",
ignored = "",
@@ -222,15 +238,20 @@ return {
-- that will be available in all sources (if not overridden in `opts[source_name].commands`)
-- see `:h neo-tree-custom-commands-global`
commands = {},
window = { -- see https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup for
window = {
-- see https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup for
-- possible options. These can also be functions that return these options.
position = "left", -- left, right, float, current
width = 40, -- applies to left and right positions
-- left, right, float, current
position = "left",
-- applies to left and right positions
width = 40,
mapping_options = {
noremap = true,
nowait = true,
},
popup = { -- settings that apply to float position only
-- settings that apply to float position only
popup = {
size = {
height = "80%",
width = "50%",
@@ -244,11 +265,14 @@ return {
mappings = {
["<space>"] = {
"toggle_node",
nowait = false, -- disable `nowait` if you have existing combos starting with this char that you want to use
-- disable `nowait` if you have existing combos
-- starting with this char that you want to use
nowait = false,
},
["<2-LeftMouse>"] = "open",
["<cr>"] = "open",
["<esc>"] = "cancel", -- close preview or floating neo-tree window
-- close preview or floating neo-tree window
["<esc>"] = "cancel",
["P"] = { "toggle_preview", config = { use_float = true } },
["l"] = "focus_preview",
["S"] = "open_split",
@@ -259,33 +283,41 @@ return {
-- ["<cr>"] = "open_drop",
-- ["t"] = "open_tab_drop",
["w"] = "open_with_window_picker",
--["P"] = "toggle_preview", -- enter preview mode, which shows the current node without focusing
-- -- enter preview mode, which shows the current node without focusing
--["P"] = "toggle_preview",
["C"] = "close_node",
-- ['C'] = 'close_all_subnodes',
["z"] = "close_all_nodes",
--["Z"] = "expand_all_nodes",
["a"] = {
"add",
-- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). see `:h neo-tree-file-actions` for details
-- some commands may take optional config options, see `:h neo-tree-mappings` for details
-- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc).
-- see `:h neo-tree-file-actions` for details
-- some commands may take optional config options,
-- see `:h neo-tree-mappings` for details
config = {
show_path = "none", -- "none", "relative", "absolute"
-- "none", "relative", "absolute"
show_path = "relative",
},
},
["A"] = "add_directory", -- also accepts the optional config.show_path option like "add". this also supports BASH style brace expansion.
-- also accepts the optional config.show_path option like "add".
-- this also supports BASH style brace expansion.
["A"] = "add_directory",
["d"] = "delete",
["r"] = "rename",
["y"] = "copy_to_clipboard",
["x"] = "cut_to_clipboard",
["p"] = "paste_from_clipboard",
["c"] = "copy", -- takes text input for destination, also accepts the optional config.show_path option like "add":
-- takes text input for destination, also accepts the optional config.show_path option like "add":
-- ["c"] = {
-- "copy",
-- config = {
-- show_path = "none" -- "none", "relative", "absolute"
-- }
--}
["m"] = "move", -- takes text input for destination, also accepts the optional config.show_path option like "add".
["c"] = "copy",
-- takes text input for destination, also accepts the optional config.show_path option like "add".
["m"] = "move",
["q"] = "close_window",
["R"] = "refresh",
["?"] = "show_help",
@@ -295,9 +327,10 @@ return {
},
nesting_rules = {},
filesystem = {
commands = {}, -- Add a custom command or override a global one using the same function name
-- Add a custom command or override a global one using the same function name
commands = {},
components = {
harpoon_index = function(config, node, state)
harpoon_index = function(config, node, _)
local Marked = require("harpoon.mark")
local path = node:get_id()
local succuss, index = pcall(Marked.get_index_of, path)
@@ -312,10 +345,12 @@ return {
end,
},
filtered_items = {
visible = false, -- when true, they will just be displayed differently than normal items
-- when true, they will just be displayed differently than normal items
visible = false,
hide_dotfiles = false,
hide_gitignored = false,
hide_hidden = true, -- only works on Windows for hidden files/directories
-- only works on Windows for hidden files/directories
hide_hidden = true,
hide_by_name = {
".git",
".DS_Store",
@@ -324,7 +359,8 @@ return {
".mypy_cache",
"node_modules",
},
hide_by_pattern = { -- uses glob style patterns
-- uses glob style patterns
hide_by_pattern = {
--"*.meta",
--"*/src/*/tsconfig.json",
"*-cache",
@@ -341,26 +377,34 @@ return {
},
},
find_by_full_path_words = true,
group_empty_dirs = false, -- when true, empty folders will be grouped together
bind_to_cwd = false, -- true creates a 2-way binding between vim's cwd and neo-tree's root
search_limit = 50, -- max number of search results when using filters
-- when true, empty folders will be grouped together
group_empty_dirs = false,
-- true creates a 2-way binding between vim's cwd and neo-tree's root
bind_to_cwd = false,
-- max number of search results when using filters
search_limit = 50,
follow_current_file = {
enabled = false, -- This will find and focus the file in the active buffer every time
-- -- the current file is changed while the tree is open.
leave_dirs_open = false, -- `false` closes auto expanded dirs, such as with `:Neotree reveal`
-- This will find and focus the file in the active buffer every time
-- the current file is changed while the tree is open.
enabled = false,
-- `false` closes auto expanded dirs, such as with `:Neotree reveal`
leave_dirs_open = false,
},
hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree
-- netrw disabled, opening a directory opens neo-tree
-- in whatever position is specified in window.position
-- "open_current", -- netrw disabled, opening a directory opens within the
-- window like netrw would, regardless of window.position
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
use_libuv_file_watcher = false, -- This will use the OS level file watchers to detect changes
hijack_netrw_behavior = "open_default",
-- This will use the OS level file watchers to detect changes
-- instead of relying on nvim autocmd events.
use_libuv_file_watcher = true,
window = {
mappings = {
["."] = "set_root",
["/"] = "fuzzy_finder",
["#"] = "fuzzy_sorter", -- fuzzy sorting using the fzy algorithm
-- fuzzy sorting using the fzy algorithm
["#"] = "fuzzy_sorter",
["<bs>"] = "navigate_up",
["<c-up>"] = "navigate_up",
["<c-x>"] = "clear_filter",
@@ -370,7 +414,8 @@ return {
["gp"] = "prev_git_modified",
["H"] = "toggle_hidden",
},
fuzzy_finder_mappings = { -- define keymaps for filter popup window in fuzzy_finder_mode
-- define keymaps for filter popup window in fuzzy_finder_mode
fuzzy_finder_mappings = {
["<down>"] = "move_cursor_down",
["<C-n>"] = "move_cursor_down",
["<up>"] = "move_cursor_up",
@@ -380,11 +425,14 @@ return {
},
buffers = {
follow_current_file = {
enabled = true, -- This will find and focus the file in the active buffer every time
-- -- the current file is changed while the tree is open.
leave_dirs_open = true, -- `false` closes auto expanded dirs, such as with `:Neotree reveal`
-- This will find and focus the file in the active buffer every time
-- the current file is changed while the tree is open.
enabled = true,
-- `false` closes auto expanded dirs, such as with `:Neotree reveal`
leave_dirs_open = true,
},
group_empty_dirs = true, -- when true, empty folders will be grouped together
-- when true, empty folders will be grouped together
group_empty_dirs = true,
show_unloaded = true,
window = {
mappings = {

View File

@@ -1,6 +1,9 @@
local prefix = "<leader>a"
-- A better annotation generator. Supports multiple languages and annotation conventions.
-- https://github.com/danymat/neogen
return {
"danymat/neogen",
dependencies = "nvim-treesitter/nvim-treesitter",
version = "*",
cmd = "Neogen",
opts = {
snippet_engine = "luasnip",
@@ -11,10 +14,10 @@ return {
},
},
keys = {
{ prefix .. "<cr>", function() require("neogen").generate({ type = "current" }) end, desc = "Current" },
{ prefix .. "c", function() require("neogen").generate({ type = "class" }) end, desc = "Class" },
{ prefix .. "f", function() require("neogen").generate({ type = "func" }) end, desc = "Function" },
{ prefix .. "t", function() require("neogen").generate({ type = "type" }) end, desc = "Type" },
{ prefix .. "F", function() require("neogen").generate({ type = "file" }) end, desc = "File" },
{ "<leader>aa", function() require("neogen").generate({ type = "current" }) end, desc = "Current" },
{ "<leader>ac", function() require("neogen").generate({ type = "class" }) end, desc = "Class" },
{ "<leader>af", function() require("neogen").generate({ type = "func" }) end, desc = "Function" },
{ "<leader>at", function() require("neogen").generate({ type = "type" }) end, desc = "Type" },
{ "<leader>aF", function() require("neogen").generate({ type = "file" }) end, desc = "File" },
},
}

View File

@@ -1,3 +1,4 @@
-- luacheck: globals vim
-- Completion menu.
-- Icons to display.
@@ -140,6 +141,7 @@ return {
-- Formatting the menu display.
formatting = {
expandable_indicator = true,
fields = { "kind", "abbr", "menu" },
format = function(_, vim_item)
vim_item.menu = vim_item.kind
@@ -202,7 +204,7 @@ return {
{
name = "nvim_lsp",
priority = 11,
--max_item_count = 10,
max_item_count = 10,
},
-- Snippets in general to facilitate life.

View File

@@ -1,10 +1,8 @@
--
-- Shows how to use the DAP plugin to debug your code.
--
-- Primarily focused on configuring the debugger for Go, but can
-- be extended to other languages as well. That's why it's called
-- kickstart.nvim and not kitchen-sink.nvim ;)
-- https://github.com/mfussenegger/nvim-dap
-- luacheck: globals vim
return {
"mfussenegger/nvim-dap",
dependencies = {
@@ -30,7 +28,7 @@ return {
-- You can provide additional configuration to the handlers,
-- see mason-nvim-dap README for more information
handlers = {},
-- handlers = {},
-- You'll need to check that you have the required things installed
-- online, please don't ask me how to install them :)
@@ -39,6 +37,7 @@ return {
"bash",
"delve",
"js",
"lua",
"php",
"python",
},

View File

@@ -4,14 +4,15 @@ return {
dependencies = {
-- Automatically install LSPs to stdpath for neovim
{ "williamboman/mason.nvim", config = true },
"williamboman/mason-lspconfig.nvim",
{ "williamboman/mason-lspconfig.nvim" },
-- Useful status updates for LSP
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ "j-hui/fidget.nvim", tag = "legacy", opts = {} },
-- NOTE: using tag legacy, fidget is being re-written completely
{ "j-hui/fidget.nvim", event = "LspAttach", tag = "legacy", opts = {} },
-- Additional lua configuration, makes nvim stuff amazing!
"folke/neodev.nvim",
{ "folke/neodev.nvim" },
},
init = function()
-- disable lsp watcher. Too slow on linux

View File

@@ -1,9 +0,0 @@
return {
"chrisgrieser/nvim-origami",
event = "BufReadPost", -- later or on keypress would prevent saving folds
opts = {
keepFoldsAcrossSessions = true,
pauseFoldsOnSearch = true,
setupFoldKeymaps = true,
},
}

View File

@@ -1,5 +0,0 @@
return {
"bennypowers/nvim-regexplainer",
opts = {},
ft = { "html", "javascript", "javascriptreact", "typescript", "typescriptreact" },
}

View File

@@ -1,17 +0,0 @@
--[[
Old text Command New text
--------------------------------------------------------------------------------
surround_words ysiw) (surround_words)
make strings ys$" "make strings"
[delete ar*ound me!] ds] delete around me!
"change quot*es" cs'" "change quotes"
<b>or tag* types</b> csth1<CR> <h1>or tag types</h1>
delete(functi*on calls) dsf function calls
]]
return {
"kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use `main` branch for the latest features
event = "VeryLazy",
config = function() require("nvim-surround").setup() end,
}

View File

@@ -1,9 +0,0 @@
return {
"nvim-treesitter/nvim-treesitter-context",
lazy = false,
enabled = true,
opts = {
enable = true,
mode = "cursor", -- cursor, or topline
},
}

View File

@@ -1,110 +1,133 @@
-- Treesitter (more highlight for syntax_on).
-- Nvim Treesitter configurations and abstraction layer
-- https://github.com/nvim-treesitter/nvim-treesitter
-- luacheck: globals vim
return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
require("nvim-treesitter.configs").setup({
-- Add languages to be installed here that you want installed for treesitter
ensure_installed = {
"bash",
"c",
"cmake",
"comment",
"diff",
"dockerfile",
"gitignore",
"go",
"graphql",
"html",
"javascript",
"json",
"json5",
"latex",
"lua",
"markdown",
"php",
"phpdoc",
"python",
"regex",
"scss",
"terraform",
"todotxt",
"toml",
"tsx",
"typescript",
"vim",
"vimdoc",
"vue",
"yaml",
},
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
require("nvim-treesitter.configs").setup({
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Autoinstall languages that are not installed.
auto_install = true,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = true,
highlight = {
enable = true,
disable = {},
--injections = {
-- python = {
-- docstrings: "markdown",
-- },
--}
},
indent = { enable = true },
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<c-space>",
node_incremental = "<c-space>",
scope_incremental = "<c-s>",
node_decremental = "<M-space>",
-- List of parsers to ignore installing (or "all")
ignore_install = {},
modules = {},
-- Add languages to be installed here that you want installed for treesitter
ensure_installed = {
"bash",
"c",
"cmake",
"comment",
"diff",
"dockerfile",
"gitignore",
"go",
"graphql",
"html",
"javascript",
"json",
"json5",
"latex",
"lua",
"markdown",
"php",
"phpdoc",
"python",
"regex",
"scss",
"terraform",
"todotxt",
"toml",
"tsx",
"typescript",
"vim",
"vimdoc",
"vue",
"yaml",
},
},
textobjects = {
select = {
highlight = {
enable = true,
disable = {},
--injections = {
-- python = {
-- docstrings: "markdown",
-- },
--}
},
indent = { enable = true },
incremental_selection = {
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",
init_selection = "<c-space>",
node_incremental = "<c-space>",
scope_incremental = "<c-s>",
node_decremental = "<M-space>",
},
},
move = {
enable = true,
set_jumps = true, -- whether to set jumps in the jumplist
goto_next_start = {
["]m"] = "@function.outer",
["]]"] = "@class.outer",
textobjects = {
select = {
enable = true,
-- Automatically jump forward to textobj, similar to targets.vim
lookahead = true,
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",
},
},
goto_next_end = {
["]M"] = "@function.outer",
["]["] = "@class.outer",
move = {
enable = true,
-- whether to set jumps in the jumplist
set_jumps = true,
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",
},
},
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",
},
},
},
swap = {
enable = true,
swap_next = {
["<leader>a"] = "@parameter.inner",
},
swap_previous = {
["<leader>A"] = "@parameter.inner",
},
},
},
})
end,
})
end,
},
{
"nvim-treesitter/nvim-treesitter-context",
lazy = false,
enabled = true,
opts = {
enable = true,
mode = "cursor", -- cursor, or topline
},
}
}

View File

@@ -1,55 +0,0 @@
-- Fold code.
return {
"anuvyklack/pretty-fold.nvim",
config = {
fill_char = "",
sections = {
left = {
"content",
},
right = {
" ",
"number_of_folded_lines",
": ",
"percentage",
" ",
function(config) return config.fill_char:rep(3) end,
},
},
remove_fold_markers = false,
-- Keep the indentation of the content of the fold string.
keep_indentation = true,
-- 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 = "spaces",
-- Comment signs additional to the value of `&commentstring` option.
comment_signs = {
{ "/**", "*/" }, -- multiline comment
{ "<!--", "-->" }, -- multiline comment
{ "%--[[", "--]]" }, -- multiline comment
},
-- List of patterns that will be removed from content foldtext section.
stop_words = {
"@brief%s*", -- (for C++) Remove '@brief' and all spaces after.
},
add_close_pattern = true,
matchup_patterns = {
{ "{", "}" },
{ "%(", ")" }, -- % to escape lua pattern char
{ "%[", "]" }, -- % to escape lua pattern char
{ "if%s", "end" },
{ "do%s", "end" },
{ "for%s", "end" },
{ "function%s*%(", "end" }, -- 'function(' or 'function ('
},
},
}

View File

@@ -1,14 +0,0 @@
return {
{
"jay-babu/project.nvim",
name = "project_nvim",
event = "VeryLazy",
opts = { ignore_lsp = { "lua_ls" } },
},
{
"nvim-telescope/telescope.nvim",
optional = true,
dependencies = { "project_nvim" },
opts = function() require("telescope").load_extension("projects") end,
},
}

View File

@@ -1,6 +1,9 @@
return {
"ThePrimeagen/refactoring.nvim",
dependencies = { "nvim-lua/plenary.nvim", "nvim-treesitter/nvim-treesitter" },
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
},
cmd = { "Refactor" },
opts = {},
keys = {

View File

@@ -1,7 +0,0 @@
return {
"m4xshen/smartcolumn.nvim",
opts = {
colorcolumn = { "80", "100", "120" },
disabled_filetypes = { "help", "text", "markdown", "json", "lazy", "starter", "neo-tree" },
},
}

View File

@@ -1 +0,0 @@
return { "stevearc/stickybuf.nvim", opts = {} }

View File

@@ -1,8 +0,0 @@
return {
"codota/tabnine-nvim",
name = "tabnine",
build = vim.loop.os_uname().sysname == "Windows_NT" and "pwsh.exe -file .\\dl_binaries.ps1" or "./dl_binaries.sh",
cmd = { "TabnineStatus", "TabnineDisable", "TabnineEnable", "TabnineToggle" },
event = "User",
opts = { accept_keymap = "<C-e>" },
}

View File

@@ -1,9 +1,11 @@
-- Telescope, a see-all-through file manager.
-- vim: ts=2 sw=2 si et
-- luacheck: globals vim
return {
"nvim-telescope/telescope.nvim",
dependencies = {
"nvim-lua/popup.nvim",
"nvim-lua/plenary.nvim",
{ "nvim-lua/plenary.nvim" },
{ "nvim-lua/popup.nvim" },
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
-- Only load if `make` is available. Make sure you have the system
-- requirements installed.
@@ -14,7 +16,7 @@ return {
build = "make",
cond = function() return vim.fn.executable("make") == 1 end,
},
"nvim-telescope/telescope-file-browser.nvim",
{ "nvim-telescope/telescope-file-browser.nvim" },
},
config = function()
local actions = require("telescope.actions")
@@ -82,9 +84,9 @@ return {
mappings = {
i = {
["<c-d>"] = actions.delete_buffer + actions.move_to_top,
}
}
}
},
},
},
},
extensions_list = { "themes", "terms" },
@@ -92,50 +94,62 @@ return {
pcall(require("telescope").load_extension, "fzf")
pcall(require("telescope").load_extension, "file_browser")
pcall(require("telescope").load_extension, "harpoon")
-- See `:help telescope.builtin`
vim.keymap.set("n", "<leader>?", require("telescope.builtin").oldfiles, { desc = "[?] Find recently opened files" })
vim.keymap.set("n", "<leader><space>", require("telescope.builtin").buffers, { desc = "[ ] Find existing buffers" })
vim.keymap.set("n", "<leader>/", function()
-- You can pass additional configuration to telescope to change theme, layout, etc.
require("telescope.builtin").current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({
winblend = 10,
previewer = false,
}))
end, { desc = "[/] Fuzzily search in current buffer" })
local tbi = require("telescope.builtin")
local wk = require("which-key")
wk.register({
["?"] = {
function() tbi.oldfiles() end,
"[?] Find recently opened files",
},
["<space>"] = {
function() tbi.buffers() end,
"[ ] Find existing buffers",
},
["/"] = {
function()
-- You can pass additional configuration to telescope to change theme, layout, etc.
tbi.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({
winblend = 10,
previewer = false,
}))
end,
"[/] Fuzzily search in current buffer",
},
vim.keymap.set(
"n",
"<leader>tg",
require("telescope.builtin").git_files,
{ desc = "[T]elescope: Search [G]it files" }
)
vim.keymap.set("n", "<leader>tf", require("telescope.builtin").find_files, { desc = "[T]elescope: Search [F]iles" })
vim.keymap.set("n", "<leader>th", require("telescope.builtin").help_tags, { desc = "[T]elescope: Search [H]elp" })
vim.keymap.set(
"n",
"<leader>tw",
require("telescope.builtin").grep_string,
{ desc = "[T]elescope: Search current [W]ord" }
)
vim.keymap.set(
"n",
"<leader>tr",
require("telescope.builtin").live_grep,
{ desc = "[T]elescope: Search by G[r]ep" }
)
vim.keymap.set(
"n",
"<leader>td",
require("telescope.builtin").diagnostics,
{ desc = "[T]elescope: Search [D]iagnostics" }
)
t = {
b = {
"<cmd>Telescope file_browser<CR>",
"[T]elescope: File [B]rowser",
},
d = {
function() tbi.diagnostics() end,
"[T]elescope: Search [D]iagnostics",
},
vim.keymap.set(
"n",
"<leader>tb",
":Telescope file_browser<CR>",
{ desc = "[T]elescope: File [B]rowser", noremap = true }
)
f = {
function() tbi.find_files() end,
"[T]elescope: Search [F]iles",
},
g = {
function() tbi.git_files() end,
"[T]elescope: Search [G]it files",
},
h = {
function() tbi.help_tags() end,
"[T]elescope: Search [H]elp",
},
r = {
function() tbi.live_grep() end,
"[T]elescope: Search by G[r]ep",
},
w = {
function() tbi.grep_string() end,
"[T]elescope: Search current [W]ord",
},
},
}, { prefix = "<leader>" })
end,
}

View File

@@ -1,48 +1,83 @@
-- Trouble for diagnostics of plugins
-- A pretty diagnostics, references, telescope results,
-- quickfix and location list to help you solve all
-- the trouble your code is causing.
-- https://github.com/folke/trouble.nvim
return {
"folke/trouble.nvim",
dependencies = "kyazdani42/nvim-web-devicons",
config = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
position = "bottom", -- position of the list can be: bottom, top, left, right
height = 10, -- height of the trouble list when position is top or bottom
width = 50, -- width of the list when position is left or right
icons = true, -- use devicons for filenames
mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist"
fold_open = "", -- icon used for open folds
fold_closed = "", -- icon used for closed folds
group = true, -- group results by file
padding = true, -- add an extra new line on top of the list
action_keys = { -- key mappings for actions in the trouble list
-- position of the list can be: bottom, top, left, right
position = "bottom",
-- height of the trouble list when position is top or bottom
height = 10,
-- width of the list when position is left or right
width = 50,
-- use devicons for filenames
icons = true,
-- "workspace_diagnostics", "document_diagnostics",
-- "quickfix", "lsp_references", "loclist"
mode = "workspace_diagnostics",
-- icon used for open folds
fold_open = "",
-- icon used for closed folds
fold_closed = "",
-- group results by file
group = true,
-- add an extra new line on top of the list
padding = true,
-- key mappings for actions in the trouble list
action_keys = {
-- map to {} to remove a mapping, for example:
-- close = {},
close = "q", -- close the list
cancel = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor
refresh = "r", -- manually refresh
jump = { "<cr>", "<tab>" }, -- jump to the diagnostic or open / close folds
open_split = { "<c-x>" }, -- open buffer in new split
open_vsplit = { "<c-v>" }, -- open buffer in new vsplit
open_tab = { "<c-t>" }, -- open buffer in new tab
jump_close = { "o" }, -- jump to the diagnostic and close the list
toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode
toggle_preview = "P", -- toggle auto_preview
hover = "K", -- opens a small popup with the full multiline message
preview = "p", -- preview the diagnostic location
close_folds = { "zM", "zm" }, -- close all folds
open_folds = { "zR", "zr" }, -- open all folds
toggle_fold = { "zA", "za" }, -- toggle fold of current file
previous = "k", -- preview item
next = "j", -- next item
-- close the list
close = "q",
-- cancel the preview and get back to your last window / buffer / cursor
cancel = "<esc>",
-- manually refresh
refresh = "r",
-- jump to the diagnostic or open / close folds
jump = { "<cr>", "<tab>" },
-- open buffer in new split
open_split = { "<c-x>" },
-- open buffer in new vsplit
open_vsplit = { "<c-v>" },
-- open buffer in new tab
open_tab = { "<c-t>" },
-- jump to the diagnostic and close the list
jump_close = { "o" },
-- toggle between "workspace" and "document" diagnostics mode
toggle_mode = "m",
-- toggle auto_preview
toggle_preview = "P",
-- opens a small popup with the full multiline message
hover = "K",
-- preview the diagnostic location
preview = "p",
-- close all folds
close_folds = { "zM", "zm" },
-- open all folds
open_folds = { "zR", "zr" },
-- toggle fold of current file
toggle_fold = { "zA", "za" },
-- preview item
previous = "k",
-- next item
next = "j",
},
indent_lines = true, -- add an indent guide below the fold icons
auto_open = false, -- automatically open the list when you have diagnostics
auto_close = false, -- automatically close the list when you have no diagnostics
auto_preview = true, -- automatically preview the location of the diagnostic. <esc> to close preview and go back to last window
auto_fold = false, -- automatically fold a file trouble list at creation
auto_jump = { "lsp_definitions" }, -- for the given modes, automatically jump if there is only a single result
-- add an indent guide below the fold icons
indent_lines = true,
-- automatically open the list when you have diagnostics
auto_open = true,
-- automatically close the list when you have no diagnostics
auto_close = true,
-- automatically preview the location of the diagnostic.
-- <esc> to close preview and go back to last window
auto_preview = true,
-- automatically fold a file trouble list at creation
auto_fold = false,
-- for the given modes, automatically jump if there is only a single result
auto_jump = { "lsp_definitions" },
signs = {
-- icons / text used for a diagnostic
error = "",
@@ -51,6 +86,7 @@ return {
information = "",
other = "",
},
use_diagnostic_signs = false, -- enabling this will use the signs defined in your lsp client
-- enabling this will use the signs defined in your lsp client
use_diagnostic_signs = false,
},
}

View File

@@ -1,4 +1,6 @@
-- Dim
-- Twilight dims inactive portions of the
-- code you're editing using TreeSitter
-- https://github.com/folke/twilight.nvim
return {
"folke/twilight.nvim",
config = {

View File

@@ -1,54 +0,0 @@
-- Colorizer for strings.
-- Minimise code.
local set = vim.api.nvim_set_var
return {
"RRethy/vim-hexokinase",
build = "cd ~/.local/share/nvim/lazy/vim-hexokinase && make hexokinase",
init = function()
-- All possible highlighters
set("Hexokinase_highlighters", {
"virtual",
"sign_column",
"background",
"backgroundfull",
-- 'foreground',
-- 'foregroundfull'
})
-- Patterns to match for all filetypes
-- Can be a comma separated string or a list of strings
-- All possible values
set("Hexokinase_optInPatterns", {
"full_hex",
"triple_hex",
"rgb",
"rgba",
"hsl",
"hsla",
"colour_names",
})
-- Filetype specific patterns to match
-- entry value must be comma seperated list
set("Hexokinase_ftOptInPatterns", {
css = "full_hex,rgb,rgba,hsl,hsla,colour_names",
html = "full_hex,rgb,rgba,hsl,hsla,colour_names",
})
-- Sample value, to keep default behaviour don't define this', variable
set("Hexokinase_ftEnabled", {
"css",
"html",
"javascript",
"scss",
"sass",
"lua",
})
-- Turn the colors on.
--vim.cmd('au BufEnter * HexokinaseTurnOn')
end,
}

View File

@@ -1,23 +0,0 @@
-- Move faster between context.
return {
"andymass/vim-matchup",
dependencies = "nvim-treesitter/nvim-treesitter",
config = {
highlight = {
enable = true,
disable = {},
},
indent = {
enable = false,
disable = {},
},
autotag = {
enable = true,
},
matchup = {
enable = true, -- mandatory, false will disable the whole extension
--disable = { "c", "ruby" }, -- optional, list of language that will be disabled
},
},
}

View File

@@ -1 +0,0 @@
return { "tpope/vim-sleuth" }

View File

@@ -1,5 +0,0 @@
return {
"wakatime/vim-wakatime",
lazy = false,
enabled = true,
}

View File

@@ -1,15 +0,0 @@
local vim = vim
return {
"folke/which-key.nvim",
enabled = true,
lazy = false,
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
end,
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
},
}

View File

@@ -7,10 +7,13 @@ source "$HOME/.dotfiles/scripts/shared.sh"
FZF_GIT="https://github.com/junegunn/fzf.git"
FZF_PATH="${XDG_CONFIG_HOME}/fzf"
FZF_BUILD="/tmp/fzf"
if [ ! -d "$FZF_PATH" ]; then
git clone --depth 1 "$FZF_GIT" "$FZF_PATH"
"$FZF_PATH/install" --xdg --all --no-update-rc
if [ ! -d "$FZF_BUILD" ]; then
git clone --depth 1 "$FZF_GIT" "$FZF_BUILD"
"$FZF_BUILD/install" \
--xdg \
--bin
else
msg_done "fzf ($FZF_PATH/) already installed"
fi