feat(nvim): combined and removed plugins

This commit is contained in:
2023-09-02 22:34:03 +03:00
parent 68727e4869
commit 73e6f8a321
16 changed files with 529 additions and 457 deletions

View File

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

View File

@@ -10,6 +10,7 @@
"cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" }, "cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" },
"cmp-look": { "branch": "master", "commit": "b39c50bcdf6199dddda56adc466c2bd9c951a960" }, "cmp-look": { "branch": "master", "commit": "b39c50bcdf6199dddda56adc466c2bd9c951a960" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" }, "cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" },
@@ -21,13 +22,12 @@
"gitsigns.nvim": { "branch": "main", "commit": "d927caa075df63bf301d92f874efb72fd22fd3b4" }, "gitsigns.nvim": { "branch": "main", "commit": "d927caa075df63bf301d92f874efb72fd22fd3b4" },
"harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" }, "harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" },
"lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" }, "lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" },
"legendary.nvim": { "branch": "master", "commit": "3db15cae08d63bab40d0c38474e368f97414f090" },
"lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, "lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "dfdd771b792fbb4bad8e057d72558255695aa1a7" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "dfdd771b792fbb4bad8e057d72558255695aa1a7" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "6148b51db945b55b3b725da39eaea6441e59dff8" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "6148b51db945b55b3b725da39eaea6441e59dff8" },
"mason.nvim": { "branch": "main", "commit": "0942198fb9a998b6ccee36fb8dd7495eb8ba659c" }, "mason.nvim": { "branch": "main", "commit": "0942198fb9a998b6ccee36fb8dd7495eb8ba659c" },
"mini.nvim": { "branch": "main", "commit": "296ebbbd3e5ba5e43f5125efe18ad76fe3b632cc" }, "mini.nvim": { "branch": "main", "commit": "296ebbbd3e5ba5e43f5125efe18ad76fe3b632cc" },
"neo-tree.nvim": { "branch": "main", "commit": "71d5559f7fa8e28a51570134e300b62f141a2f34" }, "neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" },
"neodev.nvim": { "branch": "main", "commit": "183f5a7357397260b631d6cccceccc3621b50f78" }, "neodev.nvim": { "branch": "main", "commit": "183f5a7357397260b631d6cccceccc3621b50f78" },
"neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" }, "neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" },
"nui.nvim": { "branch": "main", "commit": "aa1b4c1e05983ff7debd2b4b2788651db099de2f" }, "nui.nvim": { "branch": "main", "commit": "aa1b4c1e05983ff7debd2b4b2788651db099de2f" },
@@ -41,11 +41,10 @@
"nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" }, "nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" },
"nvim-regexplainer": { "branch": "main", "commit": "4250c8f3c1307876384e70eeedde5149249e154f" }, "nvim-regexplainer": { "branch": "main", "commit": "4250c8f3c1307876384e70eeedde5149249e154f" },
"nvim-surround": { "branch": "main", "commit": "0d6882635817a2677749a330127d12ac30a4f3c8" }, "nvim-surround": { "branch": "main", "commit": "0d6882635817a2677749a330127d12ac30a4f3c8" },
"nvim-treesitter": { "branch": "master", "commit": "e60057b389208518c8737f5a5e5f0cda72249a5e" }, "nvim-treesitter": { "branch": "master", "commit": "17b943e7c5cc2b2db3ac7b5720fbd42e75a00d8d" },
"nvim-treesitter-context": { "branch": "master", "commit": "31692b26d76ff1f7c6e0ab51814dd55e7417e96c" }, "nvim-treesitter-context": { "branch": "master", "commit": "31692b26d76ff1f7c6e0ab51814dd55e7417e96c" },
"nvim-web-devicons": { "branch": "master", "commit": "cfc8824cc1db316a276b36517f093baccb8e799a" }, "nvim-web-devicons": { "branch": "master", "commit": "cfc8824cc1db316a276b36517f093baccb8e799a" },
"nvim-window-picker": { "branch": "main", "commit": "1b1bb834b0acb9eebb11a61664efc665757f1ba2" }, "nvim-window-picker": { "branch": "main", "commit": "1b1bb834b0acb9eebb11a61664efc665757f1ba2" },
"oxocarbon.nvim": { "branch": "main", "commit": "162a92e2bcca588a01c2f9fd857bdb4dabd8d72c" },
"plenary.nvim": { "branch": "master", "commit": "0dbe561ae023f02c2fb772b879e905055b939ce3" }, "plenary.nvim": { "branch": "master", "commit": "0dbe561ae023f02c2fb772b879e905055b939ce3" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" }, "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"refactoring.nvim": { "branch": "master", "commit": "2ec9bc0fb5f3c8c6a0f776f0159dd2a3b1663554" }, "refactoring.nvim": { "branch": "master", "commit": "2ec9bc0fb5f3c8c6a0f776f0159dd2a3b1663554" },
@@ -53,15 +52,14 @@
"schemastore.nvim": { "branch": "main", "commit": "a6759df4dcfc052246ee7a6cccfdb37d2180d617" }, "schemastore.nvim": { "branch": "main", "commit": "a6759df4dcfc052246ee7a6cccfdb37d2180d617" },
"smartcolumn.nvim": { "branch": "main", "commit": "4aa00ad766f3c0f0e2561e0eb42df3ea3743c135" }, "smartcolumn.nvim": { "branch": "main", "commit": "4aa00ad766f3c0f0e2561e0eb42df3ea3743c135" },
"stickybuf.nvim": { "branch": "master", "commit": "4c667bc837e5e3fec5a8857ee99f1a229fc76df9" }, "stickybuf.nvim": { "branch": "master", "commit": "4c667bc837e5e3fec5a8857ee99f1a229fc76df9" },
"symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" },
"tabnine": { "branch": "master", "commit": "dcca6d2f9e8bbcde36aab87b9b87890810e4056d" }, "tabnine": { "branch": "master", "commit": "dcca6d2f9e8bbcde36aab87b9b87890810e4056d" },
"telescope-file-browser.nvim": { "branch": "master", "commit": "ad7b637c72549713b9aaed7c4f9c79c62bcbdff0" }, "telescope-file-browser.nvim": { "branch": "master", "commit": "ad7b637c72549713b9aaed7c4f9c79c62bcbdff0" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" },
"telescope.nvim": { "branch": "master", "commit": "2c1ed33a6f6f2db3b69f5421f6b405eda1b07748" }, "telescope.nvim": { "branch": "master", "commit": "2c1ed33a6f6f2db3b69f5421f6b405eda1b07748" },
"trouble.nvim": { "branch": "main", "commit": "3f85d8ed30e97ceeddbbcf80224245d347053711" }, "trouble.nvim": { "branch": "main", "commit": "3f85d8ed30e97ceeddbbcf80224245d347053711" },
"twilight.nvim": { "branch": "main", "commit": "a4843e6e67092a1e6fa9666f02bf0ab59174c1df" }, "twilight.nvim": { "branch": "main", "commit": "a4843e6e67092a1e6fa9666f02bf0ab59174c1df" },
"vim-hexokinase": { "branch": "master", "commit": "62324b43ea858e268fb70665f7d012ae67690f43" },
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
"vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" },
"vim-vsnip": { "branch": "master", "commit": "7753ba9c10429c29d25abfd11b4c60b76718c438" }, "vim-vsnip": { "branch": "master", "commit": "7753ba9c10429c29d25abfd11b4c60b76718c438" },
"vim-vsnip-integ": { "branch": "master", "commit": "1914e72cf3de70df7f5dde476cd299aba2440aef" }, "vim-vsnip-integ": { "branch": "master", "commit": "1914e72cf3de70df7f5dde476cd299aba2440aef" },
"vim-wakatime": { "branch": "master", "commit": "0d2efa2daff34b27b0d227d4c3b136811c93db93" }, "vim-wakatime": { "branch": "master", "commit": "0d2efa2daff34b27b0d227d4c3b136811c93db93" },

View File

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

View File

@@ -1,5 +1,4 @@
local option = vim.api.nvim_set_option -- luacheck: globals vim
local set = vim.api.nvim_set_var
-- Fix moving through lines 'gk' and 'gj' -- Fix moving through lines 'gk' and 'gj'
vim.wo.linebreak = true vim.wo.linebreak = true
@@ -123,28 +122,37 @@ vim.o.shortmess = vim.o.shortmess .. "c"
-- Menu Transparency. -- Menu Transparency.
vim.go.pumblend = 10 vim.go.pumblend = 10
--------------------Variables----------------- -- ╭──────────────────────────────────────────────────────────╮
-- │ Variables │
-- ╰──────────────────────────────────────────────────────────╯
set("one_allow_itali:set cursorlinec:set cursorlines", 1) vim.api.nvim_set_var("one_allow_itali:set cursorlinec:set cursorlines", 1)
set("do_filetype_lua", 1) vim.api.nvim_set_var("do_filetype_lua", 1)
set("MRU_File", "~/.cache/vim_mru_files") vim.api.nvim_set_var("MRU_File", "~/.cache/vim_mru_files")
--------------------API------------------------ -- ╭──────────────────────────────────────────────────────────╮
-- │ API │
-- ╰──────────────────────────────────────────────────────────╯
-- Change title accordingly. -- Change title accordingly.
option("title", true) vim.api.nvim_set_option("title", true)
-- Set clipboard to be global across the system -- Set clipboard to be global across the system
option("clipboard", "unnamedplus") vim.api.nvim_set_option("clipboard", "unnamedplus")
-- Basic fold column -- Basic fold column
option("foldcolumn", "1") vim.api.nvim_set_option("foldcolumn", "1")
-- Set dictionary to language spell -- 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 -- 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 -- Folding
option("foldmethod", "indent") vim.api.nvim_set_option("foldmethod", "syntax")
vim.api.nvim_set_option('foldenable', false)
vim.api.nvim_set_option('foldminlines', 5)

View File

@@ -1,12 +1,109 @@
-- luacheck: globals vim
return { return {
-- Plenary is used by many other plugins -- plenary: full; complete; entire; absolute; unqualified.
{ "nvim-lua/plenary.nvim", lazy = true }, -- All the lua functions I don't want to write twice.
-- https://github.com/nvim-lua/plenary.nvim
{ "nvim-lua/plenary.nvim", lazy = true },
-- Icons on menu -- lua `fork` of vim-web-devicons for neovim
"onsails/lspkind-nvim", -- https://github.com/nvim-tree/nvim-web-devicons
{ "kyazdani42/nvim-web-devicons" },
-- Restore folds and cursor position -- The theme of choise, catppuccin
"senderle/restoreview", -- https://github.com/catppuccin/nvim
{
"catppuccin/nvim",
name = "catppuccin",
priority = 10000,
enabled = true,
lazy = false,
config = function() vim.cmd.colorscheme("catppuccin") end,
opts = {
flavour = "mocha",
transparent_background = true,
dim_inactive = {
enabled = true,
shade = "dark",
percentage = 0.15,
},
integrations = {
aerial = true,
barbecue = {
-- directory name is dimmed by default
dim_dirname = true,
bold_basename = true,
dim_context = false,
alt_background = false,
},
cmp = true,
dap = { enabled = true, enable_ui = true },
gitsigns = true,
harpoon = true,
indent_blankline = {
enabled = true,
colored_indent_levels = false,
},
mason = true,
neotree = true,
notify = true,
native_lsp = {
enabled = true,
virtual_text = {
errors = { "italic" },
hints = { "italic" },
warnings = { "italic" },
information = { "italic" },
},
underlines = {
errors = { "underline" },
hints = { "underline" },
warnings = { "underline" },
information = { "underline" },
},
inlay_hints = {
background = true,
},
},
semantic_tokens = true,
symbols_outline = true,
telescope = {
enabled = true,
style = "catppuccin",
},
treesitter = true,
lsp_trouble = true,
which_key = true,
},
},
},
-- 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 -- 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. -- displays a popup with possible keybindings of the command you started typing.
@@ -43,100 +140,41 @@ return {
end, end,
}, },
-- The theme of choise, catppuccin -- Add/change/delete surrounding delimiter pairs with ease.
---- https://github.com/catppuccin/nvim -- https://github.com/kylechui/nvim-surround
{ {
"catppuccin/nvim", --[[
name = "catppuccin", Old text Command New text
priority = 10000, ------------------------------------------------------------------
enabled = true, surround_words ysiw) (surround_words)
lazy = false, make strings ys$" "make strings"
config = function() vim.cmd.colorscheme("catppuccin") end, [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 = { opts = {
flavour = "mocha", -- add your options that should be passed to the setup() function here
transparent_background = true, position = "right",
dim_inactive = {
enabled = true,
shade = "dark",
percentage = 0.15,
},
integrations = {
aerial = true,
barbecue = {
dim_dirname = true, -- directory name is dimmed by default
bold_basename = true,
dim_context = false,
alt_background = false,
},
cmp = true,
dap = { enabled = true, enable_ui = true },
gitsigns = true,
harpoon = true,
indent_blankline = {
enabled = true,
colored_indent_levels = false,
},
mason = true,
neotree = true,
notify = true,
nvimtree = false,
native_lsp = {
enabled = true,
virtual_text = {
errors = { "italic" },
hints = { "italic" },
warnings = { "italic" },
information = { "italic" },
},
underlines = {
errors = { "underline" },
hints = { "underline" },
warnings = { "underline" },
information = { "underline" },
},
inlay_hints = {
background = true,
},
},
semantic_tokens = true,
symbols_outline = true,
telescope = {
enabled = true,
style = "catppuccin",
},
ts_rainbow = true,
treesitter = true,
lsp_trouble = true,
which_key = true,
},
}, },
}, },
-- Notifications as a popup -- Getting you where you want with the fewest keystrokes.
-- https://github.com/rcarriga/nvim-notify -- https://github.com/ThePrimeagen/harpoon
{
"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,
},
{
"dstein64/vim-startuptime",
cmd = "StartupTime",
config = function() vim.g.startuptime_tries = 10 end,
},
{ "ThePrimeagen/harpoon" }, { "ThePrimeagen/harpoon" },
-- A Neovim plugin hiding your colorcolumn when unneeded. -- A Neovim plugin hiding your colorcolumn when unneeded.
@@ -150,27 +188,28 @@ return {
}, },
-- Status information for LSP. -- 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. -- Close buffer without messing up with the window.
"famiu/bufdelete.nvim", -- https://github.com/famiu/bufdelete.nvim
{ "famiu/bufdelete.nvim" },
-- Delete multiple vim buffers based on different conditions -- Delete multiple vim buffers based on different conditions
-- https://github.com/kazhala/close-buffers.nvim -- https://github.com/kazhala/close-buffers.nvim
"kazhala/close-buffers.nvim", { "kazhala/close-buffers.nvim" },
"nyoom-engineering/oxocarbon.nvim",
-- JSONLS -- JSONLS
"b0o/schemastore.nvim", -- https://github.com/b0o/schemastore.nvim
{ "b0o/schemastore.nvim" },
-- sleuth.vim: Heuristically set buffer options -- sleuth.vim: Heuristically set buffer options
-- https://github.com/tpope/vim-sleuth -- https://github.com/tpope/vim-sleuth
"tpope/vim-sleuth", { "tpope/vim-sleuth" },
-- Neovim plugin for locking a buffer to a window -- Neovim plugin for locking a buffer to a window
-- https://github.com/stevearc/stickybuf.nvim -- https://github.com/stevearc/stickybuf.nvim
{ "stevearc/stickybuf.nvim", opts = {} }, { "stevearc/stickybuf.nvim", opts = {} },
-- Describe the regexp under the cursor -- Describe the regexp under the cursor
-- https://github.com/bennypowers/nvim-regexplainer -- https://github.com/bennypowers/nvim-regexplainer
@@ -190,6 +229,8 @@ return {
-- https://github.com/LudoPinelli/comment-box.nvim -- https://github.com/LudoPinelli/comment-box.nvim
{ "LudoPinelli/comment-box.nvim", opts = {} }, { "LudoPinelli/comment-box.nvim", opts = {} },
-- Tabnine Client for Neovim
-- https://github.com/codota/tabnine-nvim
{ {
"codota/tabnine-nvim", "codota/tabnine-nvim",
name = "tabnine", name = "tabnine",

View File

@@ -1,20 +0,0 @@
-- 🗺️ A legend for your keymaps, commands, and autocmds, with which-key.nvim integration
-- https://github.com/mrjones2014/legendary.nvim
return {
"mrjones2014/legendary.nvim",
version = "*",
-- 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' }
opts = {
lazy_nvim = {
auto_register = true,
},
which_key = {
auto_register = true,
},
},
}

View File

@@ -1,4 +1,6 @@
-- File-tree manager. -- 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 -- Unless you are still migrating, remove the deprecated commands from v1.x
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]]) vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
@@ -7,7 +9,7 @@ return {
"nvim-neo-tree/neo-tree.nvim", "nvim-neo-tree/neo-tree.nvim",
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
"kyazdani42/nvim-web-devicons", -- not strictly required, but recommended "kyazdani42/nvim-web-devicons",
"MunifTanjim/nui.nvim", "MunifTanjim/nui.nvim",
{ {
-- only needed if you want to use the commands with "_with_window_picker" suffix -- 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" }) vim.fn.sign_define("DiagnosticSignHint", { text = "󰌵", texthl = "DiagnosticSignHint" })
require("neo-tree").setup({ require("neo-tree").setup({
close_if_last_window = true, -- Close Neo-tree if it is the last window left in the tab -- 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_if_last_window = true,
-- "double", "none", "rounded", "shadow", "single" or "solid"
popup_border_style = "rounded",
enable_git_status = true, enable_git_status = true,
enable_diagnostics = 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. -- popup_border_style is for input and confirmation dialogs.
-- Configurtaion of floating window is done in the individual source sections. -- Configurtaion of floating window is done in the individual source sections.
@@ -53,13 +59,20 @@ return {
close_floats_on_escape_key = true, close_floats_on_escape_key = true,
default_source = "filesystem", default_source = "filesystem",
git_status_async = true, git_status_async = true,
log_level = "info", -- "trace", "debug", "info", "warn", "error", "fatal" -- "trace", "debug", "info", "warn", "error", "fatal"
log_to_file = false, -- true, false, "/path/to/file.log", use :NeoTreeLogs to show the file log_level = "info",
open_files_in_last_window = true, -- false = open files in top left window -- true, false, "/path/to/file.log", use :NeoTreeLogs to show the file
resize_timer_interval = 100, -- in ms, needed for containers to redraw right aligned and faded content log_to_file = false,
sort_case_insensitive = true, -- used when sorting files and directories in the tree -- false = open files in top left window
use_popups_for_input = false, -- If false, inputs will use vim.ui.input() instead of custom floats. open_files_in_last_window = true,
sort_function = nil, -- use a custom function for sorting files and directories in the tree -- 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 = { event_handlers = {
-- { -- {
@@ -121,14 +134,16 @@ return {
}, },
indent = { indent = {
indent_size = 2, indent_size = 2,
padding = 1, -- extra padding on left hand side -- extra padding on left hand side
padding = 1,
-- indent guides -- indent guides
with_markers = true, with_markers = true,
indent_marker = "", indent_marker = "",
last_indent_marker = "", last_indent_marker = "",
highlight = "NeoTreeIndentMarker", highlight = "NeoTreeIndentMarker",
-- expander config, needed for nesting files -- 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_collapsed = "",
expander_expanded = "", expander_expanded = "",
expander_highlight = "NeoTreeExpander", expander_highlight = "NeoTreeExpander",
@@ -155,10 +170,10 @@ return {
git_status = { git_status = {
symbols = { symbols = {
-- Change type -- Change type
added = "˖", -- or "✚", but this is redundant info if you use git_status_colors on the name added = "˖",
modified = "±", -- or "", but this is redundant info if you use git_status_colors on the name modified = "±",
deleted = "", -- this can only be used in the git_status source deleted = "",
renamed = "", -- this can only be used in the git_status source renamed = "",
-- Status type -- Status type
untracked = "?", untracked = "?",
ignored = "", ignored = "",
@@ -223,15 +238,20 @@ return {
-- that will be available in all sources (if not overridden in `opts[source_name].commands`) -- that will be available in all sources (if not overridden in `opts[source_name].commands`)
-- see `:h neo-tree-custom-commands-global` -- see `:h neo-tree-custom-commands-global`
commands = {}, 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. -- 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 = { mapping_options = {
noremap = true, noremap = true,
nowait = true, nowait = true,
}, },
popup = { -- settings that apply to float position only -- settings that apply to float position only
popup = {
size = { size = {
height = "80%", height = "80%",
width = "50%", width = "50%",
@@ -245,11 +265,14 @@ return {
mappings = { mappings = {
["<space>"] = { ["<space>"] = {
"toggle_node", "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", ["<2-LeftMouse>"] = "open",
["<cr>"] = "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 } }, ["P"] = { "toggle_preview", config = { use_float = true } },
["l"] = "focus_preview", ["l"] = "focus_preview",
["S"] = "open_split", ["S"] = "open_split",
@@ -260,33 +283,41 @@ return {
-- ["<cr>"] = "open_drop", -- ["<cr>"] = "open_drop",
-- ["t"] = "open_tab_drop", -- ["t"] = "open_tab_drop",
["w"] = "open_with_window_picker", ["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_node",
-- ['C'] = 'close_all_subnodes', -- ['C'] = 'close_all_subnodes',
["z"] = "close_all_nodes", ["z"] = "close_all_nodes",
--["Z"] = "expand_all_nodes", --["Z"] = "expand_all_nodes",
["a"] = { ["a"] = {
"add", "add",
-- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). see `:h neo-tree-file-actions` for details -- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc).
-- some commands may take optional config options, see `:h neo-tree-mappings` for details -- see `:h neo-tree-file-actions` for details
-- some commands may take optional config options,
-- see `:h neo-tree-mappings` for details
config = { 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", ["d"] = "delete",
["r"] = "rename", ["r"] = "rename",
["y"] = "copy_to_clipboard", ["y"] = "copy_to_clipboard",
["x"] = "cut_to_clipboard", ["x"] = "cut_to_clipboard",
["p"] = "paste_from_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"] = { -- ["c"] = {
-- "copy", -- "copy",
-- config = { -- config = {
-- show_path = "none" -- "none", "relative", "absolute" -- 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", ["q"] = "close_window",
["R"] = "refresh", ["R"] = "refresh",
["?"] = "show_help", ["?"] = "show_help",
@@ -296,9 +327,10 @@ return {
}, },
nesting_rules = {}, nesting_rules = {},
filesystem = { 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 = { components = {
harpoon_index = function(config, node, state) harpoon_index = function(config, node, _)
local Marked = require("harpoon.mark") local Marked = require("harpoon.mark")
local path = node:get_id() local path = node:get_id()
local succuss, index = pcall(Marked.get_index_of, path) local succuss, index = pcall(Marked.get_index_of, path)
@@ -313,10 +345,12 @@ return {
end, end,
}, },
filtered_items = { 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_dotfiles = false,
hide_gitignored = 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 = { hide_by_name = {
".git", ".git",
".DS_Store", ".DS_Store",
@@ -325,7 +359,8 @@ return {
".mypy_cache", ".mypy_cache",
"node_modules", "node_modules",
}, },
hide_by_pattern = { -- uses glob style patterns -- uses glob style patterns
hide_by_pattern = {
--"*.meta", --"*.meta",
--"*/src/*/tsconfig.json", --"*/src/*/tsconfig.json",
"*-cache", "*-cache",
@@ -342,26 +377,34 @@ return {
}, },
}, },
find_by_full_path_words = true, find_by_full_path_words = true,
group_empty_dirs = false, -- when true, empty folders will be grouped together -- 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 group_empty_dirs = false,
search_limit = 50, -- max number of search results when using filters -- 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 = { follow_current_file = {
enabled = false, -- This will find and focus the file in the active buffer every time -- This will find and focus the file in the active buffer every time
-- -- the current file is changed while the tree is open. -- the current file is changed while the tree is open.
leave_dirs_open = false, -- `false` closes auto expanded dirs, such as with `:Neotree reveal` 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 -- in whatever position is specified in window.position
-- "open_current", -- netrw disabled, opening a directory opens within the -- "open_current", -- netrw disabled, opening a directory opens within the
-- window like netrw would, regardless of window.position -- window like netrw would, regardless of window.position
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs -- "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. -- instead of relying on nvim autocmd events.
use_libuv_file_watcher = true,
window = { window = {
mappings = { mappings = {
["."] = "set_root", ["."] = "set_root",
["/"] = "fuzzy_finder", ["/"] = "fuzzy_finder",
["#"] = "fuzzy_sorter", -- fuzzy sorting using the fzy algorithm -- fuzzy sorting using the fzy algorithm
["#"] = "fuzzy_sorter",
["<bs>"] = "navigate_up", ["<bs>"] = "navigate_up",
["<c-up>"] = "navigate_up", ["<c-up>"] = "navigate_up",
["<c-x>"] = "clear_filter", ["<c-x>"] = "clear_filter",
@@ -371,7 +414,8 @@ return {
["gp"] = "prev_git_modified", ["gp"] = "prev_git_modified",
["H"] = "toggle_hidden", ["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", ["<down>"] = "move_cursor_down",
["<C-n>"] = "move_cursor_down", ["<C-n>"] = "move_cursor_down",
["<up>"] = "move_cursor_up", ["<up>"] = "move_cursor_up",
@@ -381,11 +425,14 @@ return {
}, },
buffers = { buffers = {
follow_current_file = { follow_current_file = {
enabled = true, -- This will find and focus the file in the active buffer every time -- This will find and focus the file in the active buffer every time
-- -- the current file is changed while the tree is open. -- the current file is changed while the tree is open.
leave_dirs_open = true, -- `false` closes auto expanded dirs, such as with `:Neotree reveal` 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, show_unloaded = true,
window = { window = {
mappings = { mappings = {

View File

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

View File

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

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

View File

@@ -1,9 +1,11 @@
-- Telescope, a see-all-through file manager. -- Telescope, a see-all-through file manager.
-- vim: ts=2 sw=2 si et
-- luacheck: globals vim
return { return {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
dependencies = { 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. -- Fuzzy Finder Algorithm which requires local dependencies to be built.
-- Only load if `make` is available. Make sure you have the system -- Only load if `make` is available. Make sure you have the system
-- requirements installed. -- requirements installed.
@@ -92,50 +94,62 @@ return {
pcall(require("telescope").load_extension, "fzf") pcall(require("telescope").load_extension, "fzf")
pcall(require("telescope").load_extension, "file_browser") pcall(require("telescope").load_extension, "file_browser")
pcall(require("telescope").load_extension, "harpoon")
-- See `:help telescope.builtin` -- See `:help telescope.builtin`
vim.keymap.set("n", "<leader>?", require("telescope.builtin").oldfiles, { desc = "[?] Find recently opened files" }) local tbi = require("telescope.builtin")
vim.keymap.set("n", "<leader><space>", require("telescope.builtin").buffers, { desc = "[ ] Find existing buffers" }) local wk = require("which-key")
vim.keymap.set("n", "<leader>/", function() wk.register({
-- You can pass additional configuration to telescope to change theme, layout, etc. ["?"] = {
require("telescope.builtin").current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({ function() tbi.oldfiles() end,
winblend = 10, "[?] Find recently opened files",
previewer = false, },
})) ["<space>"] = {
end, { desc = "[/] Fuzzily search in current buffer" }) 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( t = {
"n", b = {
"<leader>tg", "<cmd>Telescope file_browser<CR>",
require("telescope.builtin").git_files, "[T]elescope: File [B]rowser",
{ desc = "[T]elescope: Search [G]it files" } },
) d = {
vim.keymap.set("n", "<leader>tf", require("telescope.builtin").find_files, { desc = "[T]elescope: Search [F]iles" }) function() tbi.diagnostics() end,
vim.keymap.set("n", "<leader>th", require("telescope.builtin").help_tags, { desc = "[T]elescope: Search [H]elp" }) "[T]elescope: Search [D]iagnostics",
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" }
)
vim.keymap.set( f = {
"n", function() tbi.find_files() end,
"<leader>tb", "[T]elescope: Search [F]iles",
":Telescope file_browser<CR>", },
{ desc = "[T]elescope: File [B]rowser", noremap = true } 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, 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 { return {
"folke/trouble.nvim", "folke/trouble.nvim",
dependencies = "kyazdani42/nvim-web-devicons", dependencies = "kyazdani42/nvim-web-devicons",
config = { config = {
-- your configuration comes here -- position of the list can be: bottom, top, left, right
-- or leave it empty to use the default settings position = "bottom",
-- refer to the configuration section below -- height of the trouble list when position is top or bottom
height = 10,
position = "bottom", -- position of the list can be: bottom, top, left, right -- width of the list when position is left or right
height = 10, -- height of the trouble list when position is top or bottom width = 50,
width = 50, -- width of the list when position is left or right -- use devicons for filenames
icons = true, -- use devicons for filenames icons = true,
mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist" -- "workspace_diagnostics", "document_diagnostics",
fold_open = "", -- icon used for open folds -- "quickfix", "lsp_references", "loclist"
fold_closed = "", -- icon used for closed folds mode = "workspace_diagnostics",
group = true, -- group results by file -- icon used for open folds
padding = true, -- add an extra new line on top of the list fold_open = "",
action_keys = { -- key mappings for actions in the trouble list -- 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: -- map to {} to remove a mapping, for example:
-- close = {}, -- close = {},
close = "q", -- close the list
cancel = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor -- close the list
refresh = "r", -- manually refresh close = "q",
jump = { "<cr>", "<tab>" }, -- jump to the diagnostic or open / close folds -- cancel the preview and get back to your last window / buffer / cursor
open_split = { "<c-x>" }, -- open buffer in new split cancel = "<esc>",
open_vsplit = { "<c-v>" }, -- open buffer in new vsplit -- manually refresh
open_tab = { "<c-t>" }, -- open buffer in new tab refresh = "r",
jump_close = { "o" }, -- jump to the diagnostic and close the list -- jump to the diagnostic or open / close folds
toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode jump = { "<cr>", "<tab>" },
toggle_preview = "P", -- toggle auto_preview -- open buffer in new split
hover = "K", -- opens a small popup with the full multiline message open_split = { "<c-x>" },
preview = "p", -- preview the diagnostic location -- open buffer in new vsplit
close_folds = { "zM", "zm" }, -- close all folds open_vsplit = { "<c-v>" },
open_folds = { "zR", "zr" }, -- open all folds -- open buffer in new tab
toggle_fold = { "zA", "za" }, -- toggle fold of current file open_tab = { "<c-t>" },
previous = "k", -- preview item -- jump to the diagnostic and close the list
next = "j", -- next item 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 -- add an indent guide below the fold icons
auto_open = false, -- automatically open the list when you have diagnostics indent_lines = true,
auto_close = false, -- automatically close the list when you have no diagnostics -- automatically open the list when you have diagnostics
auto_preview = true, -- automatically preview the location of the diagnostic. <esc> to close preview and go back to last window auto_open = true,
auto_fold = false, -- automatically fold a file trouble list at creation -- automatically close the list when you have no diagnostics
auto_jump = { "lsp_definitions" }, -- for the given modes, automatically jump if there is only a single result 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 = { signs = {
-- icons / text used for a diagnostic -- icons / text used for a diagnostic
error = "", error = "",
@@ -51,6 +86,7 @@ return {
information = "", information = "",
other = "", 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 { return {
"folke/twilight.nvim", "folke/twilight.nvim",
config = { 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,
}