From d573391bb25d2e961a9c2b3a53a32342aa3909ec Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Fri, 29 Sep 2023 11:14:30 -0500 Subject: [PATCH] updates --- lazy-lock.json | 54 +++++----- lua/plugins/indent-blankline.lua | 62 ++++++++---- lua/plugins/treesitter.lua | 166 +++++++++++++++---------------- 3 files changed, 151 insertions(+), 131 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 6a779a3..d037231 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,48 +1,48 @@ { - "LuaSnip": { "branch": "master", "commit": "409535b8fc54c650eb845b0c35e0cc7f08810284" }, + "LuaSnip": { "branch": "master", "commit": "480b032f6708573334f4437d3f83307d143f1a72" }, "auto-save.nvim": { "branch": "main", "commit": "979b6c82f60cfa80f4cf437d77446d0ded0addf0" }, "auto-session": { "branch": "main", "commit": "3eb26b949e1b90798e84926848551046e2eb0721" }, - "ccc.nvim": { "branch": "main", "commit": "4a0ddaf787cc82796e84ab8a7f70d086f250aeb6" }, + "ccc.nvim": { "branch": "main", "commit": "b7ae63e2f4fdf7540ce3f42dd1ec5a27b9930560" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "copilot-cmp": { "branch": "master", "commit": "d631b3afbf26bb17d6cf2b3cd8f3d79e7d5eeca1" }, - "copilot.lua": { "branch": "master", "commit": "b3798d85322b1aaa56cad9d651d2d1aaec6298e9" }, + "copilot-cmp": { "branch": "master", "commit": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3" }, + "copilot.lua": { "branch": "master", "commit": "1a8032ae496916ccc7a7a52ee79194fbef29f462" }, "crates.nvim": { "branch": "main", "commit": "1dffccc0a95f656ebe00cacb4de282473430c5a1" }, - "diffview.nvim": { "branch": "main", "commit": "db97e667e03294bfa9f15e544e78f3082247bf79" }, - "gitsigns.nvim": { "branch": "main", "commit": "5a2b1205841bc06ffb15719b14d54987e17b22ae" }, + "diffview.nvim": { "branch": "main", "commit": "a111d19ccceac6530448d329c63f998f77b5626e" }, + "gitsigns.nvim": { "branch": "main", "commit": "bdeba1cec3faddd89146690c10b9a87949c0ee66" }, "glow.nvim": { "branch": "advanced_window", "commit": "f1157d4cb7e46e830c72004e7e1adb81a1f9b04c" }, - "indent-blankline.nvim": { "branch": "master", "commit": "4541d690816cb99a7fc248f1486aa87f3abce91c" }, - "lazy.nvim": { "branch": "main", "commit": "dac844ed617dda4f9ec85eb88e9629ad2add5e05" }, - "lazygit.nvim": { "branch": "main", "commit": "22e51e03268fabe068a77e2bd316ac25ff2084f9" }, + "indent-blankline.nvim": { "branch": "master", "commit": "2ec42d26c933e7a129fe056dfc11a207afff252d" }, + "lazy.nvim": { "branch": "main", "commit": "6a2c47e6424a3f1e373bfeb714b716f6be13501c" }, + "lazygit.nvim": { "branch": "main", "commit": "de35012036d43bca03628d40d083f7c02a4cda3f" }, "lsp-inlayhints.nvim": { "branch": "main", "commit": "d981f65c9ae0b6062176f0accb9c151daeda6f16" }, "lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "e86a4c84ff35240639643ffed56ee1c4d55f538e" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "81e30dd629de24cbb26d08073ee938ab40006695" }, "mason-null-ls.nvim": { "branch": "main", "commit": "ae0c5fa57468ac65617f1bf821ba0c3a1e251f0c" }, - "mason.nvim": { "branch": "main", "commit": "68e6a153d7cd1251eb85ebb48d2e351e9ab940b8" }, + "mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" }, "material.nvim": { "branch": "main", "commit": "1ecaa2d065a1ea308bd7702a77c2bf35ede8f536" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "20c2f2f5ba083bbb1e37b8bc3d590621434f31e9" }, - "neodev.nvim": { "branch": "main", "commit": "4681d489cce1604a75435494fe278514f9835a87" }, - "neogit": { "branch": "master", "commit": "13c9fca8b6aa30940fa34461b5ea7b47c109e6ad" }, + "neo-tree.nvim": { "branch": "main", "commit": "20c2f2f5ba083bbb1e37b8bc3d590621434f31e9" }, + "neodev.nvim": { "branch": "main", "commit": "58b1c0740e8ad79ce71e2649a449bb90536435cf" }, + "neogit": { "branch": "master", "commit": "e238f075a81806dc2dce803422beef42540a312e" }, "nerdcommenter": { "branch": "master", "commit": "d2e21d417f6c788b11ae3b90d7ac478930dead36" }, - "nui.nvim": { "branch": "main", "commit": "9e3916e784660f55f47daa6f26053ad044db5d6a" }, + "nui.nvim": { "branch": "main", "commit": "c8de23342caf8d50b15d6b28368d36a56a69d76f" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, - "nvim-cmp": { "branch": "main", "commit": "51f1e11a89ec701221877532ee1a23557d291dd5" }, - "nvim-lspconfig": { "branch": "master", "commit": "0d29cad8de3b2c654315203fc1fe12fde722a18a" }, - "nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" }, - "nvim-treesitter": { "branch": "master", "commit": "f7bb866405530e863135596900781e73cbf6f4ed" }, + "nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" }, + "nvim-lspconfig": { "branch": "master", "commit": "61b40df9c17943e43e7e698873caab0e7dbcdadc" }, + "nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" }, + "nvim-treesitter": { "branch": "master", "commit": "16ea2969ea0a5ba902fceece9b2db10c7c9ba2d6" }, "nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" }, - "nvim-ts-context-commentstring": { "branch": "main", "commit": "e9062e2dfb9854e6a927370f2d720de354c88524" }, - "nvim-web-devicons": { "branch": "master", "commit": "cfc8824cc1db316a276b36517f093baccb8e799a" }, - "openingh.nvim": { "branch": "main", "commit": "2719e5759ecf4b9a2d492fbf52d03d2e6fc6126a" }, - "playground": { "branch": "master", "commit": "2b81a018a49f8e476341dfcb228b7b808baba68b" }, - "plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" }, - "rest.nvim": { "branch": "main", "commit": "22673c848768ff25517154a5aebfebc0c77d0b4f" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "95e9ba9de4289d221666b66fd930d157c7ca08c6" }, + "nvim-web-devicons": { "branch": "master", "commit": "45d0237c427baba8cd05e0ab26d30e2ee58c2c82" }, + "openingh.nvim": { "branch": "main", "commit": "cdca4f17dbc2ed85ea5e54c594eb57c4057d9290" }, + "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" }, + "plenary.nvim": { "branch": "master", "commit": "9ce85b0f7dcfe5358c0be937ad23e456907d410b" }, + "rest.nvim": { "branch": "main", "commit": "16c1c8d80a6a65c409be4342130a8a61a7497f98" }, "rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, "telescope.nvim": { "branch": "master", "commit": "c1a2af0af69e80e14e6b226d3957a064cd080805" }, - "text-case.nvim": { "branch": "main", "commit": "cd7cc65a412beb713e68f3b84e45990a939b7b6b" }, + "text-case.nvim": { "branch": "main", "commit": "0a8ef564493a850b7646c57d55682e2ba19e50ad" }, "undotree": { "branch": "master", "commit": "0e11ba7325efbbb3f3bebe06213afa3e7ec75131" }, "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" } } \ No newline at end of file diff --git a/lua/plugins/indent-blankline.lua b/lua/plugins/indent-blankline.lua index 8af46d0..21d2833 100644 --- a/lua/plugins/indent-blankline.lua +++ b/lua/plugins/indent-blankline.lua @@ -5,20 +5,12 @@ vim.opt.listchars:append "eol:↴" vim.opt.listchars:append "tab: >" local highlight = require('util').highlight --- Dull Version -highlight("IndentBlanklineIndent1", { fg = "#915053", gui="nocombine" }) -highlight("IndentBlanklineIndent2", { fg = "#A27F3E", gui="nocombine" }) -highlight("IndentBlanklineIndent3", { fg = "#6B7F6E", gui="nocombine" }) -highlight("IndentBlanklineIndent4", { fg = "#5A747D", gui="nocombine" }) -highlight("IndentBlanklineIndent5", { fg = "#6B6282", gui="nocombine" }) - --- highlight("SpecialKey", { fg = "#fff", gui = "nocombine" }) --- highlight("Whitespace", { fg = "#fff", gui = "nocombine" }) highlight("NonText", { fg = "#303030", gui = "nocombine" }) return { -- Add indentation guides even on blank lines "lukas-reineke/indent-blankline.nvim", + main = "ibl", -- Enable `lukas-reineke/indent-blankline.nvim` -- See `:help indent_blankline.txt` opts = { @@ -28,18 +20,46 @@ return { -- char = '.', -- char = '¦', use_treesitter = true, - char_highlight_list = { - "IndentBlanklineIndent1", - "IndentBlanklineIndent2", - "IndentBlanklineIndent3", - "IndentBlanklineIndent4", - "IndentBlanklineIndent5", + scope = { + enabled = true, + char = "┊", + show_start = true, + show_end = true, + highlight = { + "IndentBlanklineScope1", + "IndentBlanklineScope2", + "IndentBlanklineScope3", + "IndentBlanklineScope4", + "IndentBlanklineScope5", + } }, - - - - - - + indent = { + char = '│', + highlight = { + "IndentBlanklineIndent1", + "IndentBlanklineIndent2", + "IndentBlanklineIndent3", + "IndentBlanklineIndent4", + "IndentBlanklineIndent5", + }, + } }, + config = function(_, opts) + local hooks = require "ibl.hooks" + hooks.register(hooks.type.HIGHLIGHT_SETUP, function() + vim.api.nvim_set_hl(0, "IndentBlanklineIndent1", { fg = "#915053" }) + vim.api.nvim_set_hl(0, "IndentBlanklineIndent2", { fg = "#A27F3E" }) + vim.api.nvim_set_hl(0, "IndentBlanklineIndent3", { fg = "#6B7F6E" }) + vim.api.nvim_set_hl(0, "IndentBlanklineIndent4", { fg = "#5a74aa" }) + vim.api.nvim_set_hl(0, "IndentBlanklineIndent5", { fg = "#6B6282" }) + + vim.api.nvim_set_hl(0, "IndentBlanklineScope1", { fg = "#CB5D60" }) + vim.api.nvim_set_hl(0, "IndentBlanklineScope2", { fg = "#DEA93F" }) + vim.api.nvim_set_hl(0, "IndentBlanklineScope3", { fg = "#89B790" }) + vim.api.nvim_set_hl(0, "IndentBlanklineScope4", { fg = "#6289E5" }) + vim.api.nvim_set_hl(0, "IndentBlanklineScope5", { fg = "#917DC0" }) + end) + + require('ibl').setup(opts) + end } diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 1972a5d..0136a1e 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -1,92 +1,92 @@ local auto = true local output = vim.fn.system({ - "which", - "tree-sitter", + "which", + "tree-sitter", }) if output == nil or output == "" then - auto = false + auto = false end return { - { - "nvim-treesitter/nvim-treesitter", - dependencies = { "windwp/nvim-ts-autotag", "JoosepAlviste/nvim-ts-context-commentstring" }, - build = ":TSUpdate", - event = "BufRead", - cmd = { - "TSBufDisable", - "TSBufEnable", - "TSBufToggle", - "TSDisable", - "TSEnable", - "TSToggle", - "TSInstall", - "TSInstallInfo", - "TSInstallSync", - "TSModuleInfo", - "TSUninstall", - "TSUpdate", - "TSUpdateSync", - }, - opts = { - -- https://github.com/nvim-treesitter/nvim-treesitter#supported-languages + { + "nvim-treesitter/nvim-treesitter", + dependencies = { "windwp/nvim-ts-autotag", "JoosepAlviste/nvim-ts-context-commentstring" }, + build = ":TSUpdate", + event = "BufRead", + cmd = { + "TSBufDisable", + "TSBufEnable", + "TSBufToggle", + "TSDisable", + "TSEnable", + "TSToggle", + "TSInstall", + "TSInstallInfo", + "TSInstallSync", + "TSModuleInfo", + "TSUninstall", + "TSUpdate", + "TSUpdateSync", + }, + opts = { + -- https://github.com/nvim-treesitter/nvim-treesitter#supported-languages --ensure_installed = "all", - ensure_installed = { - "lua", - "http", - "json", - "bash", - "css", - "diff", - "dockerfile", - "dot", - "git_rebase", - "gitattributes", - "html", - "java", - "javascript", - "jq", - "jsdoc", - "json5", - "kotlin", - "latex", - "make", - "markdown", - "markdown_inline", - "nix", - "python", - "regex", - "rst", - "rust", - "scss", - "sql", - "terraform", - "toml", - "tsx", - "typescript", - "vue", - "yaml", - }, - auto_install = auto, - highlight = { - enable = true, - use_languagetree = true, - -- disable = function(_, bufnr) return vim.api.nvim_buf_line_count(bufnr) > 10000 end, - -- additional_vim_regex_highlighting = false, - }, - incremental_selection = { enable = true }, - ident = { enable = true }, - autotag = { enable = true }, - context_commentstring = { enable = true, enable_autocmd = false }, - rainbow = { - enable = true, - extended_mode = true, - max_file_lines = nil, - }, - }, - config = function(_, opts) - require("nvim-treesitter.configs").setup(opts) - end, - }, - "nvim-treesitter/playground", + ensure_installed = { + "lua", + "http", + "json", + "bash", + "css", + "diff", + "dockerfile", + "dot", + "git_rebase", + "gitattributes", + "html", + "java", + "javascript", + "jq", + "jsdoc", + "json5", + "kotlin", + "latex", + "make", + "markdown", + "markdown_inline", + "nix", + "python", + "regex", + "rst", + "rust", + "scss", + "sql", + "terraform", + "toml", + "tsx", + "typescript", + "vue", + "yaml", + }, + auto_install = auto, + highlight = { + enable = true, + use_languagetree = true, + -- disable = function(_, bufnr) return vim.api.nvim_buf_line_count(bufnr) > 10000 end, + -- additional_vim_regex_highlighting = false, + }, + incremental_selection = { enable = true }, + ident = { enable = true }, + autotag = { enable = true }, + context_commentstring = { enable = true, enable_autocmd = false }, + rainbow = { + enable = true, + extended_mode = true, + max_file_lines = nil, + }, + }, + config = function(_, opts) + require("nvim-treesitter.configs").setup(opts) + end, + }, + "nvim-treesitter/playground", }