Cleanup
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# Neovim Config
|
# Neovim Config
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
* Git
|
|
||||||
* [ripgrep](https://github.com/BurntSushi/ripgrep)
|
* [ripgrep](https://github.com/BurntSushi/ripgrep)
|
||||||
* [fd](https://github.com/sharkdp/fd)
|
* [fd](https://github.com/sharkdp/fd)
|
||||||
|
* [sed](https://www.gnu.org/software/sed) - required for search/replace
|
||||||
|
|||||||
1
init.lua
1
init.lua
@@ -1,6 +1,5 @@
|
|||||||
-- Import core configuration
|
-- Import core configuration
|
||||||
require("core")
|
require("core")
|
||||||
require("core.neovide")
|
|
||||||
|
|
||||||
-- Bootstrap lazy.nvim
|
-- Bootstrap lazy.nvim
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
|||||||
@@ -1,55 +1,44 @@
|
|||||||
{
|
{
|
||||||
"Comment.nvim": { "branch": "master", "commit": "176e85eeb63f1a5970d6b88f1725039d85ca0055" },
|
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
|
||||||
"LuaSnip": { "branch": "master", "commit": "0b4950a237ce441a6a3a947d501622453f6860ea" },
|
"LuaSnip": { "branch": "master", "commit": "80a8528f084a97b624ae443a6f50ff8074ba486b" },
|
||||||
"alpha-nvim": { "branch": "main", "commit": "e4fc5e29b731bdf55d204c5c6a11dc3be70f3b65" },
|
"barbar.nvim": { "branch": "master", "commit": "283bceab39f549c5e5228212661750704fcfcd9e" },
|
||||||
"barbar.nvim": { "branch": "master", "commit": "8cca17ea0ced3ba564e5da972a25600edafe7d7b" },
|
|
||||||
"bigfile.nvim": { "branch": "main", "commit": "9616b73670ffeb92679677554ded88854ae42cf8" },
|
"bigfile.nvim": { "branch": "main", "commit": "9616b73670ffeb92679677554ded88854ae42cf8" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
|
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
||||||
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
"diffview.nvim": { "branch": "main", "commit": "d38c1b5266850f77f75e006bcc26213684e1e141" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"dressing.nvim": { "branch": "master", "commit": "1f2d1206a03bd3add8aedf6251e4534611de577f" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
"flutter-tools.nvim": { "branch": "main", "commit": "7350750d46fbeb4d2bb4878157b658d435935299" },
|
||||||
"cosmic-ui": { "branch": "main", "commit": "c0b14531999f2bfef3d927c4dcd57a1a8fed5ee9" },
|
"git-blame.nvim": { "branch": "master", "commit": "4ff5874c80f25c5aaaaad8394eedbcb9f6b286cc" },
|
||||||
"diffview.nvim": { "branch": "main", "commit": "e91110d2a7f8e2f667666aba6ea089ff823f8748" },
|
"gitsigns.nvim": { "branch": "main", "commit": "5a9a6ac29a7805c4783cda21b80a1e361964b3f2" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "713b56e13c58ad519920e0e634763345cb4fc832" },
|
"glow.nvim": { "branch": "main", "commit": "5b38fb7b6e806cac62707a4aba8c10c5f14d5bb5" },
|
||||||
"flutter-tools.nvim": { "branch": "main", "commit": "561d85b16d8ca2938820a9c26b2fe74096d89c81" },
|
"goto-preview": { "branch": "main", "commit": "b428db4d2a5b7c06e149a020e31b2121fbf57a67" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "4aed1a0ca605cb1c87f59799a0cc4afe00a40272" },
|
|
||||||
"git-blame.nvim": { "branch": "master", "commit": "93d983806a0c76692bebd6f804c8eaa2a3844452" },
|
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "adcf2c7f2f495f5df148683764bf7cba6a70f34c" },
|
|
||||||
"glow.nvim": { "branch": "main", "commit": "bbd0473d72a45094495ee5600b5577823543eefe" },
|
|
||||||
"guess-indent.nvim": { "branch": "main", "commit": "b8ae749fce17aa4c267eec80a6984130b94f80b2" },
|
"guess-indent.nvim": { "branch": "main", "commit": "b8ae749fce17aa4c267eec80a6984130b94f80b2" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "4541d690816cb99a7fc248f1486aa87f3abce91c" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "9301e434dd41154ffe5c3d5b8a5c9acd075ebeff" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "3ad55ae678876516156cca2f361c51f7952a924b" },
|
"lazy.nvim": { "branch": "main", "commit": "4c75c8eeb957a99aa44ce8e526c04340ab358c5e" },
|
||||||
"lsp_signature.nvim": { "branch": "master", "commit": "17ff7a405fea8376b015b8ea7910d2e59958bf68" },
|
"lsp-zero.nvim": { "branch": "v3.x", "commit": "22d2186bee730d68f6fd3bb2d19a389784c37a96" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" },
|
"lsp_signature.nvim": { "branch": "master", "commit": "33250c84c7a552daf28ac607d9d9e82f88cd0907" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "e86a4c84ff35240639643ffed56ee1c4d55f538e" },
|
"lualine.nvim": { "branch": "master", "commit": "7533b0ead663d80452210c0c089e5105089697e5" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "3f6b544c75c01549f7a2a9e395e0f1cea42b25dd" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "e7b64c11035aa924f87385b72145e0ccf68a7e0a" },
|
||||||
"neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" },
|
"mason.nvim": { "branch": "main", "commit": "cd7835b15f5a4204fc37e0aa739347472121a54c" },
|
||||||
"neodev.nvim": { "branch": "main", "commit": "866b6b6e687a93ba98851a03a74bf6d9211b7299" },
|
"neo-tree.nvim": { "branch": "v3.x", "commit": "6f8c49956c89e9fefae6acdfe1d57c6293b0a03d" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" },
|
"nui.nvim": { "branch": "main", "commit": "c0c8e347ceac53030f5c1ece1c5a5b6a17a25b32" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "ae5b41ce880a6d850055e262d6dfebd362bb276e" },
|
"nvim-autopairs": { "branch": "master", "commit": "f6c71641f6f183427a651c0ce4ba3fb89404fa9e" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "c4e491a87eeacf0408902c32f031d802c7eafce8" },
|
"nvim-cmp": { "branch": "main", "commit": "d3a3056204e1a9dbb7c7fe36c114dc43b681768c" },
|
||||||
"nvim-code-action-menu": { "branch": "main", "commit": "e4399dbaf6eabff998d3d5f1cbcd8d9933710027" },
|
|
||||||
"nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" },
|
"nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "d17d1bba23ec72a157bd183c57840c39e323f515" },
|
"nvim-lspconfig": { "branch": "master", "commit": "e49b1e90c1781ce372013de3fa93a91ea29fc34a" },
|
||||||
"nvim-dap-go": { "branch": "main", "commit": "eab43d63cef832801a701812913e4d1d726725e5" },
|
"nvim-spectre": { "branch": "master", "commit": "696cff781a4a7ecc91549736835e2acbd00fe859" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "85b16ac2309d85c88577cd8ee1733ce52be8227e" },
|
"nvim-treesitter": { "branch": "master", "commit": "afa103385a2b5ef060596ed822ef63276ae88016" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "dd11ba7b3c8f82d51b6d4dd7d68fce2d78bf78a0" },
|
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "7b04e8b67eec7d92daadf9f0717dd272ddfc81a3" },
|
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
|
||||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "7f625207f225eea97ef7a6abe7611e556c396d2f" },
|
"nvim-web-devicons": { "branch": "master", "commit": "3af745113ea537f58c4b1573b64a429fefad9e07" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "efbfed0567ef4bfac3ce630524a0f6c8451c5534" },
|
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" },
|
|
||||||
"smart-splits.nvim": { "branch": "master", "commit": "7aad6019dee974a01333523a5b8e122b7e7da454" },
|
|
||||||
"symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" },
|
"symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" },
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "1228f3b15ca3d9b95dcb92efda6a3448871030bd" },
|
"telescope.nvim": { "branch": "0.1.x", "commit": "7011eaae0ac1afe036e30c95cf80200b8dc3f21a" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "09b0b17d824d2d56f02ff15967e8a2499a89c731" },
|
"todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" },
|
||||||
"toggleterm.nvim": { "branch": "main", "commit": "b90a1381e9b5b8596f49070ee86c71db267ac868" },
|
"toggleterm.nvim": { "branch": "main", "commit": "faee9d60428afc7857e0927fdc18daa6c409fa64" },
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "1ee11019f8a81dac989ae1db1a013e3d582e2033" },
|
"tokyonight.nvim": { "branch": "main", "commit": "633039585dff7fd2b9b62fb190bf768702609d95" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "d572f59aaf7eef670d6ddc331032a7d5e59d634e" },
|
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
|
||||||
"vim-illuminate": { "branch": "master", "commit": "a2907275a6899c570d16e95b9db5fd921c167502" },
|
"vim-illuminate": { "branch": "master", "commit": "3bd2ab64b5d63b29e05691e624927e5ebbf0fb86" },
|
||||||
"vim-matchup": { "branch": "master", "commit": "ca8971739e3908973c5912cb3a0ffb6cf7bd83e7" },
|
"vim-matchup": { "branch": "master", "commit": "6dbe108230c7dbbf00555b7d4d9f6a891837ef07" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "38b990f6eabf62014018b4aae70a97d7a6c2eb88" }
|
"vim-wakatime": { "branch": "master", "commit": "945a441b83e48c7bafdd227ef8e2eb826f72ab90" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "ce741eb559c924d72e3a67d2189ad3771a231414" }
|
||||||
}
|
}
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
{
|
|
||||||
"workspace.library": [
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/neodev.nvim/types/stable",
|
|
||||||
"/Users/ghost/Documents/DEV/IDE/nvim-macos/share/nvim/runtime/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/glow.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/vim-illuminate/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/telescope.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/todo-comments.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/lsp_signature.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/indent-blankline.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/guess-indent.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/plenary.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/gitsigns.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/trouble.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/barbar.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/nvim-cmp/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/nvim-code-action-menu/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/nvim-lspconfig/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/cmp-nvim-lsp/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/nvim-ts-autotag/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/nvim-ts-context-commentstring/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/lazy.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/git-blame.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/tokyonight.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/cmp_luasnip/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/lualine.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/smart-splits.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/telescope-fzf-native.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/mason-lspconfig.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/nvim-treesitter/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/neo-tree.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/toggleterm.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/symbols-outline.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/mason.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/nvim-dap-ui/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/cmp-cmdline/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/cmp-path/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/cmp-buffer/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/nvim-web-devicons/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/nvim-dap/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/neodev.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/Comment.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/filetype.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/cmp-nvim-lua/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/vim-matchup/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/nvim-dap-go/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/bigfile.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/LuaSnip/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/nvim-colorizer.lua/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/diffview.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/nvim-autopairs/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/nui.nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/alpha-nvim/lua",
|
|
||||||
"/Users/ghost/.local/share/nvim/lazy/cosmic-ui/lua",
|
|
||||||
"/Users/ghost/.config/nvim/lua",
|
|
||||||
"${3rd}/luv/library"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
local g = vim.g
|
|
||||||
local keymap = vim.keymap
|
|
||||||
|
|
||||||
g.neovide_scale_factor = 1.0
|
|
||||||
|
|
||||||
local change_scale_factor = function(delta)
|
|
||||||
g.neovide_scale_factor = g.neovide_scale_factor * delta
|
|
||||||
end
|
|
||||||
|
|
||||||
keymap.set("n", "<C-=>", function()
|
|
||||||
change_scale_factor(1.25)
|
|
||||||
end)
|
|
||||||
|
|
||||||
keymap.set("n", "<C-->", function()
|
|
||||||
change_scale_factor(1/1.25)
|
|
||||||
end)
|
|
||||||
@@ -1,6 +1,10 @@
|
|||||||
return {
|
return {
|
||||||
"romgrk/barbar.nvim",
|
"romgrk/barbar.nvim",
|
||||||
dependencies = "nvim-tree/nvim-web-devicons",
|
event = "BufEnter",
|
||||||
|
dependencies = {
|
||||||
|
"lewis6991/gitsigns.nvim",
|
||||||
|
"nvim-tree/nvim-web-devicons"
|
||||||
|
},
|
||||||
init = function() vim.g.barbar_auto_setup = false end,
|
init = function() vim.g.barbar_auto_setup = false end,
|
||||||
opts = {
|
opts = {
|
||||||
auto_hide = true,
|
auto_hide = true,
|
||||||
|
|||||||
@@ -1,42 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
opts = {
|
event = "BufEnter",
|
||||||
char = "▏",
|
main = "ibl",
|
||||||
context_char = "▏",
|
config = true
|
||||||
filetype_exclude = {
|
|
||||||
"help",
|
|
||||||
"terminal",
|
|
||||||
"alpha",
|
|
||||||
"lazy",
|
|
||||||
"neo-tree",
|
|
||||||
"Trouble"
|
|
||||||
},
|
|
||||||
buftype_exclude = { "nofile", "terminal" },
|
|
||||||
context_patterns = {
|
|
||||||
"class",
|
|
||||||
"return",
|
|
||||||
"function",
|
|
||||||
"method",
|
|
||||||
"^if",
|
|
||||||
"^while",
|
|
||||||
"jsx_element",
|
|
||||||
"^for",
|
|
||||||
"^object",
|
|
||||||
"^table",
|
|
||||||
"block",
|
|
||||||
"arguments",
|
|
||||||
"if_statement",
|
|
||||||
"else_clause",
|
|
||||||
"jsx_element",
|
|
||||||
"jsx_self_closing_element",
|
|
||||||
"try_statement",
|
|
||||||
"catch_clause",
|
|
||||||
"import_statement",
|
|
||||||
"operation_type"
|
|
||||||
},
|
|
||||||
show_trailing_blankline_indent = false,
|
|
||||||
show_first_indent_level = false,
|
|
||||||
use_treesitter = true,
|
|
||||||
show_current_context = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,54 +1,29 @@
|
|||||||
return {
|
return {
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
dependencies = {
|
event = "InsertEnter",
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
dependencies = "L3MON4D3/LuaSnip",
|
||||||
"saadparwaiz1/cmp_luasnip",
|
|
||||||
"hrsh7th/cmp-buffer",
|
|
||||||
"hrsh7th/cmp-path",
|
|
||||||
"hrsh7th/cmp-cmdline",
|
|
||||||
"hrsh7th/cmp-nvim-lua"
|
|
||||||
},
|
|
||||||
event = { "InsertEnter", "CmdlineEnter" },
|
|
||||||
config = function()
|
config = function()
|
||||||
|
local lsp_zero = require("lsp-zero")
|
||||||
|
lsp_zero.extend_cmp()
|
||||||
|
|
||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
|
local cmp_action = lsp_zero.cmp_action()
|
||||||
|
|
||||||
cmp.setup {
|
cmp.setup({
|
||||||
snippet = {
|
formatting = lsp_zero.cmp_format(),
|
||||||
expand = function(args)
|
window = {
|
||||||
require("luasnip").lsp_expand(args.body)
|
completion = cmp.config.window.bordered(),
|
||||||
end
|
documentation = cmp.config.window.bordered()
|
||||||
},
|
},
|
||||||
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
["<C-e>"] = cmp.mapping.abort(),
|
["<C-u>"] = cmp.mapping.scroll_docs(-4),
|
||||||
|
["<C-d>"] = cmp.mapping.scroll_docs(4),
|
||||||
|
["<C-f>"] = cmp_action.luasnip_jump_forward(),
|
||||||
|
["<C-b>"] = cmp_action.luasnip_jump_backward(),
|
||||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||||
["<Tab>"] = cmp.mapping.select_next_item(),
|
["<Tab>"] = cmp.mapping.select_next_item(),
|
||||||
["<S-Tab>"] = cmp.mapping.select_prev_item()
|
["<S-Tab>"] = cmp.mapping.select_prev_item()
|
||||||
}),
|
|
||||||
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = "nvim_lsp" },
|
|
||||||
{ name = "luasnip" }
|
|
||||||
}, {
|
|
||||||
{ name = "buffer" },
|
|
||||||
{ name = "path" }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
cmp.setup.cmdline({ "/", "?" }, {
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = { name = "buffer" }
|
|
||||||
})
|
|
||||||
|
|
||||||
cmp.setup.cmdline(":", {
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = "path" }
|
|
||||||
}, {
|
|
||||||
{ name = "cmdline" }
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,78 +0,0 @@
|
|||||||
local wk = require("which-key")
|
|
||||||
|
|
||||||
wk.setup {
|
|
||||||
ignore_missing = true,
|
|
||||||
key_labels = {
|
|
||||||
["<space>"] = "SPC"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
wk.register({
|
|
||||||
["<leader>"] = {
|
|
||||||
f = {
|
|
||||||
name = "Find",
|
|
||||||
f = { "<cmd>Telescope fd<CR>", "find file" },
|
|
||||||
w = { "<cmd>Telescope live_grep<CR>", "live grep" },
|
|
||||||
s = { "<cmd>Telescope spell_suggest<CR>", "spell suggest" },
|
|
||||||
b = { "<cmd>Telescope buffers<CR>", "all buffers" },
|
|
||||||
t = { "<cmd>TodoTelescope<CR>", "todos" },
|
|
||||||
["."] = { "<cmd>Telescope keymaps<CR>", "keymaps" }
|
|
||||||
},
|
|
||||||
|
|
||||||
l = {
|
|
||||||
name = "LSP",
|
|
||||||
r = { "<cmd>lua require('cosmic-ui').rename()<CR>", "rename" },
|
|
||||||
d = { "<cmd>Telescope diagnostics<CR>", "diagnostics" },
|
|
||||||
f = { "<cmd>lua vim.lsp.buf.format { async = true }<CR>", "format" },
|
|
||||||
a = { "<cmd>CodeActionMenu<CR>", "code action" }
|
|
||||||
},
|
|
||||||
|
|
||||||
b = {
|
|
||||||
name = "Buffer",
|
|
||||||
p = { "<cmd>BufferPick<CR>", "pick buffer" },
|
|
||||||
q = { "<cmd>BufferMovePrevious<CR>", "move buffer left" },
|
|
||||||
w = { "<cmd>BufferMoveNext<CR>", "move buffer right" },
|
|
||||||
x = { "<cmd>BufferCloseAllButCurrent<CR>", "close all but current" }
|
|
||||||
},
|
|
||||||
|
|
||||||
g = {
|
|
||||||
name = "Git",
|
|
||||||
b = { "<cmd>Gitsigns blame_line<CR>", "blame line" },
|
|
||||||
B = { "<cmd>DiffviewOpen<CR>", "diff view & merge tool" },
|
|
||||||
d = { "<cmd>Gitsigns diffthis<CR>", "diff" },
|
|
||||||
s = { "<cmd>Telescope git_status<CR>", "git status" },
|
|
||||||
c = { "<cmd>Telescope git_commits<CR>", "commits" },
|
|
||||||
C = { "<cmd>DiffviewClose<CR>", "close diffview & merge tool" }
|
|
||||||
},
|
|
||||||
|
|
||||||
x = { "<cmd>BufferClose<CR>", "close buffer" },
|
|
||||||
c = { "<cmd>Telescope colorscheme<CR>", "colorscheme" },
|
|
||||||
s = { "<cmd>SymbolsOutline<CR>", "symbols outline" },
|
|
||||||
h = { "<cmd>noh<CR>", "no highlight" },
|
|
||||||
k = { "<cmd>lua vim.lsp.buf.hover()<CR>", "hover" }
|
|
||||||
},
|
|
||||||
|
|
||||||
t = {
|
|
||||||
name = "Trouble",
|
|
||||||
t = { "<cmd>TroubleToggle<CR>", "toggle trouble" }
|
|
||||||
},
|
|
||||||
|
|
||||||
g = {
|
|
||||||
d = { "<cmd>lua vim.lsp.buf.definition()<CR>", "definition" },
|
|
||||||
D = { "<cmd>lua vim.lsp.buf.declaration()<CR>", "declaration" },
|
|
||||||
i = { "<cmd>lua vim.lsp.buf.implementation()<CR>", "implementation" },
|
|
||||||
t = { "<cmd>lua vim.lsp.buf.type_definition()<CR>", "type definition" }
|
|
||||||
},
|
|
||||||
|
|
||||||
K = { "<cmd>lua require('lsp_signature').toggle_float_win()<CR>", "hover" },
|
|
||||||
|
|
||||||
-- Nvim Tree
|
|
||||||
["<C-n>"] = { "<cmd>Neotree toggle<CR>", "toggle neotree" },
|
|
||||||
|
|
||||||
-- Switching Buffers
|
|
||||||
["<TAB>"] = { "<cmd>BufferNext<CR>", "next buffer" },
|
|
||||||
["<S-TAB>"] = { "<cmd>BufferPrevious<CR>", "previous buffer" },
|
|
||||||
|
|
||||||
-- Find in file
|
|
||||||
["<C-f>"] = { "<cmd>Telescope current_buffer_fuzzy_find<CR>", "find in file" }
|
|
||||||
})
|
|
||||||
@@ -1,25 +1,31 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
"LunarVim/bigfile.nvim",
|
"LunarVim/bigfile.nvim",
|
||||||
"f-person/git-blame.nvim",
|
"wakatime/vim-wakatime",
|
||||||
"nvim-tree/nvim-web-devicons",
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"numToStr/Comment.nvim",
|
"nvim-pack/nvim-spectre",
|
||||||
|
dependencies = "nvim-lua/plenary.nvim"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"folke/todo-comments.nvim",
|
||||||
|
event = "BufRead",
|
||||||
|
dependencies = "nvim-lua/plenary.nvim",
|
||||||
config = true
|
config = true
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"goolord/alpha-nvim",
|
"nmac427/guess-indent.nvim",
|
||||||
dependencies = "nvim-tree/nvim-web-devicons",
|
lazy = false,
|
||||||
config = function()
|
config = true
|
||||||
require("alpha").setup(require("alpha.themes.dashboard").config)
|
|
||||||
end
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"andymass/vim-matchup",
|
"andymass/vim-matchup",
|
||||||
dependencies = "nvim-treesitter/nvim-treesitter"
|
event = "CursorMoved",
|
||||||
|
config = function()
|
||||||
|
vim.g.matchup_matchparen_offscreen = { method = "popup" }
|
||||||
|
end
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -28,19 +34,12 @@ return {
|
|||||||
config = true
|
config = true
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
-- NOTE: Git
|
||||||
"folke/todo-comments.nvim",
|
"f-person/git-blame.nvim",
|
||||||
dependencies = "nvim-lua/plenary.nvim",
|
|
||||||
config = true
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"nmac427/guess-indent.nvim",
|
|
||||||
config = true
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
|
event = "BufEnter",
|
||||||
config = true
|
config = true
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -52,58 +51,30 @@ return {
|
|||||||
},
|
},
|
||||||
|
|
||||||
-- NOTE: LSP
|
-- NOTE: LSP
|
||||||
|
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"VonHeikemen/lsp-zero.nvim",
|
||||||
|
branch = "v3.x",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
dependencies = {
|
config = false,
|
||||||
{ "folke/neodev.nvim", opts = { experimental = { pathStrict = true } } },
|
init = function()
|
||||||
"williamboman/mason-lspconfig.nvim"
|
local g = vim.g
|
||||||
}
|
g.lsp_zero_extend_cmp = 0
|
||||||
},
|
g.lsp_zero_extend_lspconfig = 0
|
||||||
|
|
||||||
{
|
|
||||||
"williamboman/mason-lspconfig.nvim",
|
|
||||||
dependencies = "williamboman/mason.nvim",
|
|
||||||
config = function()
|
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
|
||||||
|
|
||||||
local handlers = {
|
|
||||||
function (server_name)
|
|
||||||
require("lspconfig")[server_name].setup {
|
|
||||||
capabilities = capabilities
|
|
||||||
}
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
require("mason-lspconfig").setup { handlers = handlers }
|
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
build = ":MasonUpdate",
|
lazy = false,
|
||||||
config = true
|
config = true
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
"L3MON4D3/LuaSnip",
|
|
||||||
dependencies = {
|
|
||||||
"rafamadriz/friendly-snippets",
|
|
||||||
config = function()
|
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
|
||||||
end
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"windwp/nvim-autopairs",
|
"windwp/nvim-autopairs",
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
config = true
|
config = true
|
||||||
},
|
},
|
||||||
|
|
||||||
"RRethy/vim-illuminate",
|
|
||||||
|
|
||||||
{
|
{
|
||||||
"ray-x/lsp_signature.nvim",
|
"ray-x/lsp_signature.nvim",
|
||||||
dependencies = "neovim/nvim-lspconfig",
|
dependencies = "neovim/nvim-lspconfig",
|
||||||
@@ -124,42 +95,21 @@ return {
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"weilbith/nvim-code-action-menu",
|
"numToStr/Comment.nvim",
|
||||||
dependencies = "neovim/nvim-lspconfig",
|
lazy = false,
|
||||||
cmd = "CodeActionMenu"
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"CosmicNvim/cosmic-ui",
|
|
||||||
lazy = true,
|
|
||||||
dependencies = {
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
"nvim-lua/plenary.nvim"
|
|
||||||
},
|
|
||||||
config = true
|
config = true
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"rcarriga/nvim-dap-ui",
|
"rmagatti/goto-preview",
|
||||||
lazy = true,
|
opts = {
|
||||||
dependencies = "mfussenegger/nvim-dap",
|
default_mappings = true
|
||||||
config = true
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
"RRethy/vim-illuminate",
|
||||||
"leoluz/nvim-dap-go",
|
|
||||||
lazy = true,
|
|
||||||
dependencies = "mfussenegger/nvim-dap",
|
|
||||||
config = true
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
"folke/which-key.nvim",
|
|
||||||
config = function()
|
|
||||||
require("plugins.config.whichkey")
|
|
||||||
end
|
|
||||||
},
|
|
||||||
|
|
||||||
|
-- NOTE: Flutter
|
||||||
{
|
{
|
||||||
"akinsho/flutter-tools.nvim",
|
"akinsho/flutter-tools.nvim",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
|
|||||||
27
lua/plugins/lsp.lua
Normal file
27
lua/plugins/lsp.lua
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
return {
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
cmd = { "LspInfo", "LspInstall", "LspStart" },
|
||||||
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
|
dependencies = {
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local lsp_zero = require("lsp-zero")
|
||||||
|
lsp_zero.extend_lspconfig()
|
||||||
|
|
||||||
|
lsp_zero.on_attach(function(_, bufnr)
|
||||||
|
lsp_zero.default_keymaps({ buffer = bufnr })
|
||||||
|
end)
|
||||||
|
|
||||||
|
require("mason-lspconfig").setup({
|
||||||
|
handlers = {
|
||||||
|
lsp_zero.default_setup,
|
||||||
|
lua_ls = function()
|
||||||
|
local lua_opts = lsp_zero.nvim_lua_ls()
|
||||||
|
require("lspconfig").lua_ls.setup(lua_opts)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
||||||
@@ -1,19 +1,21 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
event = "BufEnter",
|
event = "BufEnter",
|
||||||
|
dependencies = "nvim-tree/nvim-web-devicons",
|
||||||
opts = {
|
opts = {
|
||||||
options = {
|
options = {
|
||||||
theme = "tokyonight"
|
theme = "tokyonight"
|
||||||
},
|
},
|
||||||
|
|
||||||
extensions = {
|
extensions = {
|
||||||
"fzf",
|
"fzf",
|
||||||
"lazy",
|
"lazy",
|
||||||
"neo-tree",
|
"neo-tree",
|
||||||
"nvim-dap-ui",
|
"nvim-dap-ui",
|
||||||
|
"quickfix",
|
||||||
"symbols-outline",
|
"symbols-outline",
|
||||||
"toggleterm",
|
"toggleterm",
|
||||||
"trouble"
|
"trouble",
|
||||||
|
"mason"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
branch = "v3.x",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
@@ -7,70 +8,17 @@ return {
|
|||||||
},
|
},
|
||||||
cmd = "Neotree",
|
cmd = "Neotree",
|
||||||
init = function()
|
init = function()
|
||||||
vim.g.neo_tree_remove_legacy_commands = true
|
vim.fn.sign_define("DiagnosticSignError", { text = " ", texthl = "DiagnosticSignError" })
|
||||||
vim.fn.sign_define("DiagnosticSignError",
|
vim.fn.sign_define("DiagnosticSignWarn", { text = " ", texthl = "DiagnosticSignWarn" })
|
||||||
{ text = " ", texthl = "DiagnosticSignError" })
|
vim.fn.sign_define("DiagnosticSignInfo", { text = " ", texthl = "DiagnosticSignInfo" })
|
||||||
vim.fn.sign_define("DiagnosticSignWarn",
|
vim.fn.sign_define("DiagnosticSignHint", { text = "", texthl = "DiagnosticSignHint" })
|
||||||
{ text = " ", texthl = "DiagnosticSignWarn" })
|
|
||||||
vim.fn.sign_define("DiagnosticSignInfo",
|
|
||||||
{ text = " ", texthl = "DiagnosticSignInfo" })
|
|
||||||
vim.fn.sign_define("DiagnosticSignHint",
|
|
||||||
{ text = "", texthl = "DiagnosticSignHint" })
|
|
||||||
end,
|
end,
|
||||||
opts = {
|
opts = {
|
||||||
close_if_last_window = true,
|
close_if_last_window = true,
|
||||||
|
window = { width = "30" },
|
||||||
source_selector = {
|
|
||||||
winbar = true,
|
|
||||||
content_layout = "center",
|
|
||||||
sources = {
|
|
||||||
{ source = "filesystem", display_name = " Files" },
|
|
||||||
{ source = "buffers", display_name = " Buffers" },
|
|
||||||
{ source = "git_status", display_name = " Git" }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
group_empty_dirs = true,
|
|
||||||
window = { width = 30 },
|
|
||||||
|
|
||||||
filesystem = {
|
filesystem = {
|
||||||
follow_current_file = true,
|
follow_current_file = { enabled = true },
|
||||||
hijack_netrw_behavior = "open_current",
|
group_empty_dirs = true
|
||||||
use_libuv_file_watcher = true
|
|
||||||
},
|
|
||||||
|
|
||||||
default_component_configs = {
|
|
||||||
icon = {
|
|
||||||
folder_empty = "",
|
|
||||||
folder_empty_open = ""
|
|
||||||
},
|
|
||||||
git_status = {
|
|
||||||
symbols = {
|
|
||||||
renamed = "",
|
|
||||||
unstaged = ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
document_symbols = {
|
|
||||||
kinds = {
|
|
||||||
File = { icon = "", hl = "Tag" },
|
|
||||||
Namespace = { icon = "", hl = "Include" },
|
|
||||||
Package = { icon = "", hl = "Label" },
|
|
||||||
Class = { icon = "", hl = "Include" },
|
|
||||||
Property = { icon = "", hl = "@property" },
|
|
||||||
Enum = { icon = "", hl = "@number" },
|
|
||||||
Function = { icon = "", hl = "Function" },
|
|
||||||
String = { icon = "", hl = "String" },
|
|
||||||
Number = { icon = "", hl = "Number" },
|
|
||||||
Array = { icon = "", hl = "Type" },
|
|
||||||
Object = { icon = "", hl = "Type" },
|
|
||||||
Key = { icon = "", hl = "" },
|
|
||||||
Struct = { icon = "", hl = "Type" },
|
|
||||||
Operator = { icon = "", hl = "Operator" },
|
|
||||||
TypeParameter = { icon = "", hl = "Type" },
|
|
||||||
StaticMethod = { icon = ' ', hl = 'Function' }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
return {
|
|
||||||
"mrjones2014/smart-splits.nvim",
|
|
||||||
build = "./kitty/install-kittens.bash",
|
|
||||||
opt = {
|
|
||||||
ignored_buftypes = { "NeoTree" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +1,19 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
|
branch = "0.1.x",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-telescope/telescope-fzf-native.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
enabled = vim.fn.executable "make" == 1,
|
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" }
|
||||||
build = "make"
|
|
||||||
},
|
},
|
||||||
cmd = "Telescope",
|
|
||||||
config = function()
|
config = function()
|
||||||
local telescope = require("telescope")
|
local telescope = require("telescope")
|
||||||
|
|
||||||
telescope.setup {
|
telescope.setup {
|
||||||
defaults = {
|
defaults = {
|
||||||
layout_strategy = "vertical"
|
layout_strategy = "vertical",
|
||||||
},
|
|
||||||
|
|
||||||
file_ignore_patterns = { "node_modules" }
|
file_ignore_patterns = { "node_modules" }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
telescope.load_extension("fzf")
|
telescope.load_extension("fzf")
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
"folke/tokyonight.nvim",
|
"folke/tokyonight.nvim",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
opts = {
|
opts = {
|
||||||
style = "night",
|
style = "night",
|
||||||
styles = {
|
styles = {
|
||||||
|
|||||||
@@ -1,20 +1,22 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"windwp/nvim-ts-autotag",
|
{ "windwp/nvim-ts-autotag", config = true }
|
||||||
"JoosepAlviste/nvim-ts-context-commentstring"
|
|
||||||
},
|
},
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-treesitter.configs").setup {
|
local configs = require("nvim-treesitter.configs")
|
||||||
|
|
||||||
|
configs.setup {
|
||||||
|
ensure_installed = { "lua" },
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
incremental_selection = { enable = true },
|
|
||||||
indent = {
|
indent = {
|
||||||
enable = true,
|
enable = true,
|
||||||
disable = { 'dart' }
|
disable = { "dart" }
|
||||||
},
|
},
|
||||||
|
|
||||||
autotag = { enable = true },
|
autotag = { enable = true },
|
||||||
context_commentstring = { enable = true, enable_autocmd = false },
|
|
||||||
matchup = { enable = true }
|
matchup = { enable = true }
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|||||||
83
lua/plugins/whichkey.lua
Normal file
83
lua/plugins/whichkey.lua
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
local function config()
|
||||||
|
local wk = require("which-key")
|
||||||
|
|
||||||
|
wk.register({
|
||||||
|
["<leader>"] = {
|
||||||
|
-- Finders
|
||||||
|
f = {
|
||||||
|
name = "Finders",
|
||||||
|
f = { "<cmd>Telescope fd<CR>", "Find files" },
|
||||||
|
w = { "<cmd>Telescope live_grep<CR>", "Text grep" },
|
||||||
|
s = { "<cmd>Telescope spell_suggest<CR>", "Spell suggest" },
|
||||||
|
t = { "<cmd>TodoTelescope<CR>", "Todos" },
|
||||||
|
["."] = { "<cmd>Telescope keymaps<CR>", "Keymaps" }
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Buffers
|
||||||
|
b = {
|
||||||
|
name = "Buffers",
|
||||||
|
p = { "<cmd>BufferPick<CR>", "Pick buffer" },
|
||||||
|
q = { "<cmd>BufferMovePrevious<CR>", "Move buffer left" },
|
||||||
|
w = { "<cmd>BufferMoveNext<CR>", "Move buffer right" },
|
||||||
|
x = { "<cmd>BufferCloseAllButCurrent<CR>", "Close all but current" }
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Git
|
||||||
|
g = {
|
||||||
|
name = "Git",
|
||||||
|
b = { "<cmd>Gitsigns blame_line<CR>", "Blame line" },
|
||||||
|
d = { "<cmd>Gitsigns diffthis<CR>", "Diff" },
|
||||||
|
D = { "<cmd>DiffviewOpen<CR>", "Diff view & merge tool" },
|
||||||
|
C = { "<cmd>DiffviewClose<CR>", "Close diffview & merge tool" }
|
||||||
|
},
|
||||||
|
|
||||||
|
-- LSP
|
||||||
|
l = {
|
||||||
|
name = "LSP",
|
||||||
|
f = { "<cmd>lua vim.lsp.buf.format { async = true }<CR>", "Format" },
|
||||||
|
a = { "<cmd>lua vim.lsp.buf.code_action()<CR>", "Code Action" }
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Misc
|
||||||
|
c = { "<cmd>BufferClose<CR>", "Close buffer" },
|
||||||
|
h = { "<cmd>noh<CR>", "No highlight" },
|
||||||
|
s = { "<cmd>SymbolsOutline<CR>", "Symbols outline" },
|
||||||
|
t = { "<cmd>TroubleToggle<CR>", "Toggle trouble" }
|
||||||
|
},
|
||||||
|
|
||||||
|
g = {
|
||||||
|
d = { "<cmd>lua vim.lsp.buf.definition()<CR>", "definition" },
|
||||||
|
t = { "<cmd>lua vim.lsp.buf.type_definition()<CR>", "type definition" }
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Neotree
|
||||||
|
["<C-n>"] = { "<cmd>Neotree toggle<CR>", "Toggle neotree" },
|
||||||
|
|
||||||
|
-- Switching Buffers
|
||||||
|
["<TAB>"] = { "<cmd>BufferNext<CR>", "Next buffer" },
|
||||||
|
["<S-TAB>"] = { "<cmd>BufferPrevious<CR>", "Previous buffer" },
|
||||||
|
|
||||||
|
-- Find in file
|
||||||
|
["<C-f>"] = { "<cmd>Telescope current_buffer_fuzzy_find<CR>", "Find in file" },
|
||||||
|
|
||||||
|
-- Text replacer in file
|
||||||
|
["<C-r>"] = { "<cmd>lua require('spectre').toggle()<CR>", "Replace in file" }
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
init = function()
|
||||||
|
local o = vim.o
|
||||||
|
o.timeout = true
|
||||||
|
o.timeoutlen = 300
|
||||||
|
end,
|
||||||
|
config = config,
|
||||||
|
opts = {
|
||||||
|
ignore_missing = false,
|
||||||
|
key_labels = {
|
||||||
|
["<space>"] = "SPC"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user