From 6e639bf24a3bf5eacba2f9e6ba9f2a0f962f4a04 Mon Sep 17 00:00:00 2001 From: Christian Nieves Date: Wed, 29 May 2024 18:39:20 +0000 Subject: [PATCH] performance stuff --- config/.config/nvim/lazy-lock.json | 111 +++++++++--------- google/.blazerc | 2 +- vim/.vim/lua/config/lsp-google.lua | 3 +- vim/.vim/lua/plugins/base.lua | 17 +-- vim/.vim/lua/plugins/cmp.lua | 69 ++++++++--- vim/.vim/lua/plugins/lsp.lua | 22 ++-- vim/.vim/lua/plugins/mason.lua | 1 + vim/.vim/lua/plugins/nvim-treesitter.lua | 4 +- vim/.vim/lua/plugins/nvim-treesitter.lua.orig | 75 ------------ vim/.vim/lua/plugins/scroll.lua | 36 +++--- 10 files changed, 146 insertions(+), 194 deletions(-) delete mode 100644 vim/.vim/lua/plugins/nvim-treesitter.lua.orig diff --git a/config/.config/nvim/lazy-lock.json b/config/.config/nvim/lazy-lock.json index ddef4a1..2abff77 100644 --- a/config/.config/nvim/lazy-lock.json +++ b/config/.config/nvim/lazy-lock.json @@ -1,123 +1,124 @@ { "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, "LuaSnip": { "branch": "master", "commit": "a7a4b4682c4b3e2ba82b82a4e6e5f5a0e79dec32" }, - "actions-preview.nvim": { "branch": "master", "commit": "5072b1b1065a6b22bdd46b5c21780a91d6a08071" }, - "aerial.nvim": { "branch": "master", "commit": "83a79f39b709c20be4c830d241379fa85ef21a7c" }, + "actions-preview.nvim": { "branch": "master", "commit": "e8d41b608e24319548637685c7cfa66fadaff2b2" }, + "aerial.nvim": { "branch": "master", "commit": "bd5f141a547c082e9c1644026f38590407dad659" }, "ai.nvim": { "branch": "main", "commit": "ab6b6f54612500f48d4d34fcf81529946b9338f3" }, - "asyncrun.vim": { "branch": "master", "commit": "014e2e2fe51ad4b1a774cffa0f12887767d952eb" }, - "bufferline.nvim": { "branch": "main", "commit": "f4b4b980ce88d546aeb69d11463187c8f716a1a1" }, - "catppuccin": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" }, + "asyncrun.vim": { "branch": "master", "commit": "182c636909cfd41e1d72e1278a7db6a4e5271b81" }, + "bufferline.nvim": { "branch": "main", "commit": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe" }, + "catppuccin": { "branch": "main", "commit": "5215ea59df6d0a7e27da9a5cd1165e06d1b04cbe" }, "ciderlsp-nvim": { "branch": "main", "commit": "16d7b742ad22a5534a22d2ba06516ab611ab1e7b" }, "cmp-async-path": { "branch": "main", "commit": "9d581eec5acf812316913565c135b0d1ee2c9a71" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-calc": { "branch": "main", "commit": "ce91d14d2e7a8b3f6ad86d85e34d41c1ae6268d9" }, + "cmp-calc": { "branch": "main", "commit": "5947b412da67306c5b68698a02a846760059be2e" }, "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, "cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" }, "cmp-emoji": { "branch": "main", "commit": "e8398e2adf512a03bb4e1728ca017ffeac670a9f" }, "cmp-nerdfont": { "branch": "main", "commit": "a3b7c0cadb7bd389f513eecda376d4c6bec90003" }, "cmp-nvim-ciderlsp": { "branch": "main", "commit": "74fd95906faaa4da0b3708bf065f8a03c7a99995" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, - "cmp-nvim-lsp-document-symbol": { "branch": "main", "commit": "f0f53f704c08ea501f9d222b23491b0d354644b0" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, + "cmp-nvim-lsp-document-symbol": { "branch": "main", "commit": "f94f7ba948e32cd302caba1c2ca3f7c697fb4fcf" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, - "cmp-spell": { "branch": "master", "commit": "32a0867efa59b43edbb2db67b0871cfad90c9b66" }, - "cmp-treesitter": { "branch": "master", "commit": "13e4ef8f4dd5639fca2eb9150e68f47639a9b37d" }, + "cmp-spell": { "branch": "master", "commit": "694a4e50809d6d645c1ea29015dad0c293f019d6" }, + "cmp-treesitter": { "branch": "master", "commit": "958fcfa0d8ce46d215e19cc3992c542f576c4123" }, "cmp-under-comparator": { "branch": "master", "commit": "6857f10272c3cfe930cece2afa2406e1385bfef8" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "conflict-marker.vim": { "branch": "master", "commit": "11a4d42244755505b66b15cd4496a150432eb5e3" }, - "conform.nvim": { "branch": "master", "commit": "12b3995537f52ba2810a9857e8ca256881febbda" }, + "conflict-marker.vim": { "branch": "master", "commit": "62742b2ffe7a433988759c67b5c5a22eff74a14b" }, + "conform.nvim": { "branch": "master", "commit": "f3b930db4964d60e255c8f9e37b7f2218dfc08cb" }, "crates.nvim": { "branch": "main", "commit": "1dffccc0a95f656ebe00cacb4de282473430c5a1" }, - "dashboard-nvim": { "branch": "master", "commit": "1c8b82c5b02bb890862538be2061e37ef801a99b" }, - "debugprint.nvim": { "branch": "main", "commit": "a72528bb5fdaab293d00e4b1380ab21c4c82b0a5" }, + "dashboard-nvim": { "branch": "master", "commit": "5182c09ac8085dc73b78ad0ea9f5479c9a866fc4" }, + "debugprint.nvim": { "branch": "main", "commit": "8f2a335fb0e6ebf0291a3551e0198363437e3a38" }, "ferris.nvim": { "branch": "main", "commit": "52e39c017f511e8cf9a024022d48164bfbfe52ee" }, - "firenvim": { "branch": "master", "commit": "03ba12a5a92a02d171005775a8150998c4060a74" }, - "friendly-snippets": { "branch": "main", "commit": "d5f74ce4dfdd82848f3f4eac65fe6e29ac5df4c2" }, - "fzf": { "branch": "master", "commit": "dba1644518a74a6263f76900b04d7b7c0ea6e894" }, - "fzf.vim": { "branch": "master", "commit": "269c08641ed5a842a19c03ca14e3eac3ac7ea74b" }, + "firenvim": { "branch": "master", "commit": "cf4ff99033640b5ec33890bcdc892ddc436ed8e5" }, + "friendly-snippets": { "branch": "main", "commit": "d0610077b6129cf9f7f78afbe3a1425d60f6e2f1" }, + "fzf": { "branch": "master", "commit": "124cd70710cb7c94ef2282773494bb0d727598d8" }, + "fzf.vim": { "branch": "master", "commit": "0a80e43f9027ec64213d602dbb0b22d65a072ca8" }, "gcert.nvim": { "branch": "main", "commit": "7f1eee55a7469523550c049df8f991a0a1430a37" }, "gdrama-syntax.vim": { "branch": "main", "commit": "004eda58d6e3ce3d1b46bbf257bd99784c475a0e" }, "git-conflict.nvim": { "branch": "main", "commit": "4c8e252b87d54d944c1e56bfb477f78b6fdaf661" }, + "go.nvim": { "branch": "master", "commit": "588ab7b6511538ba182ad96e4d7d29615e11cb24" }, "googlepaths.nvim": { "branch": "main", "commit": "54b972d91573879e19d87d3e7e85f558e0e83160" }, - "gopher.nvim": { "branch": "main", "commit": "ac27f4b6794c872140fb205313d79ab166892fe9" }, + "guihua.lua": { "branch": "master", "commit": "a53b76514ad42d92a821d75d712ef71e71898fcf" }, "harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" }, - "hg": { "branch": "main", "commit": "1c4bdf80174ec840ba76c4dc7032c4313db62199" }, + "hg": { "branch": "main", "commit": "12ee0a788309734f1f312060b9f984a97157acf3" }, "java-syntax.vim": { "branch": "master", "commit": "9a3d76a8c6cd7765ba93a7bdd9280594167e3f1b" }, "kotlin-vim": { "branch": "master", "commit": "53fe045906df8eeb07cb77b078fc93acda6c90b8" }, - "lazy.nvim": { "branch": "main", "commit": "3f13f080434ac942b150679223d54f5ca91e0d52" }, - "lazygit.nvim": { "branch": "main", "commit": "0ada6c6e7e138df92f5009b6952f4ac41248305a" }, - "leap.nvim": { "branch": "main", "commit": "626be4c4ec040aeaf6466c9aae17ee0ab09f1a5b" }, + "lazy.nvim": { "branch": "main", "commit": "24fa2a97085ca8a7220b5b078916f81e316036fd" }, + "lazygit.nvim": { "branch": "main", "commit": "ad3e1ea592f9d13e86e0d4e850224d9d78069508" }, + "leap.nvim": { "branch": "main", "commit": "0a034970fb430e6027f2df556af04e19e4d9ccc5" }, "libp.nvim": { "branch": "main", "commit": "636b1748e92f66022c1763f32b2ded6b8606eda5" }, "lsp-status.nvim": { "branch": "master", "commit": "54f48eb5017632d81d0fd40112065f1d062d0629" }, "lsp-timeout.nvim": { "branch": "main", "commit": "6325906730330105a9adc41d0ceb8499b3072e2b" }, "lsp-virtual-improved.nvim": { "branch": "master", "commit": "db9cd544b7febdf4c48374e351b3903143b4477d" }, - "lsp-zero.nvim": { "branch": "v3.x", "commit": "e00dcf8a6019a88139626c1668dccdc295abd324" }, + "lsp-zero.nvim": { "branch": "v3.x", "commit": "16de3b18c5f7b6230d89b8e64ce9a4801b6f8d08" }, "lsp_lines.nvim": { "branch": "main", "commit": "dbfd8e96ec2696e1ceedcd23fd70e842256e3dea" }, - "lsp_signature.nvim": { "branch": "master", "commit": "c6aeb2f1d2538bbdfdaab1664d9d4c3c75aa9db8" }, + "lsp_signature.nvim": { "branch": "master", "commit": "529e8861d0410389f0163a5e5c2199d4a4ef5bf6" }, "lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, "luasnip-google.nvim": { "branch": "main", "commit": "5fd7feb144de0ecea837618c9c9e1bbecc0e3243" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "273fdde8ac5e51f3a223ba70980e52bbc09d9f6f" }, - "mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" }, - "mellifluous.nvim": { "branch": "main", "commit": "6e347c901d4aa4405c6de8c5c181f471edbaea06" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" }, + "mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" }, + "mellifluous.nvim": { "branch": "main", "commit": "da003ec9780e548364d4db96ff45d2a1fe0ccf43" }, "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" }, "neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" }, "neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" }, "neoscopes": { "branch": "main", "commit": "470dff042004b93c10d262e8b0ad7bf6f703f86f" }, - "neovim-ayu": { "branch": "master", "commit": "e03beacbc51f1a985d7a4b69828fd7612a4151e0" }, + "neovim-ayu": { "branch": "master", "commit": "d7a2b754c9f9be3c30e14a53d6cfda3e111edd24" }, "neovim-throttle-debounce": { "branch": "main", "commit": "5247b097df15016ab31db672b77ec4938bb9cbfd" }, - "nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" }, - "nvgoog": { "branch": "main", "commit": "b2e437e7439e61544251d7d6060459c01755e29c" }, - "nvim-cmp": { "branch": "main", "commit": "8f3c541407e691af6163e2447f3af1bd6e17f9a3" }, + "nui.nvim": { "branch": "main", "commit": "b1b3dcd6ed8f355c78bad3d395ff645be5f8b6ae" }, + "nvgoog": { "branch": "main", "commit": "fa5c142ada88ddfbf74f50c455c1f8b2992a16cc" }, + "nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" }, "nvim-cmp-buffer-lines": { "branch": "master", "commit": "924ccc04dc5c919b6baa05d45818025baa82699a" }, "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, - "nvim-dap": { "branch": "master", "commit": "6ae8a14828b0f3bff1721a35a1dfd604b6a933bb" }, - "nvim-dap-ui": { "branch": "master", "commit": "5934302d63d1ede12c0b22b6f23518bb183fc972" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "3e8e207513e6ef520894950acd76b79902714103" }, + "nvim-dap": { "branch": "master", "commit": "abb238f631609ea4be496ba7946f4f3aaec86c6a" }, + "nvim-dap-ui": { "branch": "master", "commit": "b7267003ba4dd860350be86f75b9d9ea287cedca" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "d7c695ea39542f6da94ee4d66176f5d660ab0a77" }, "nvim-hlslens": { "branch": "main", "commit": "3e8fceb2b030100857ee72741a8f48c9a1d8595e" }, - "nvim-jdtls": { "branch": "master", "commit": "8eb5f0dbe6e126b392ddcaf45893358619893e45" }, + "nvim-jdtls": { "branch": "master", "commit": "10691312d51c5485c656a71258b55d3798d3fb3e" }, "nvim-lightbulb": { "branch": "master", "commit": "8f00b89dd1b1dbde16872bee5fbcee2e58c9b8e9" }, - "nvim-lint": { "branch": "master", "commit": "861a04313501563bb1b11f125ae9b7237a517b9b" }, - "nvim-lspconfig": { "branch": "master", "commit": "aa5f4f4ee10b2688fb37fa46215672441d5cd5d9" }, - "nvim-luapad": { "branch": "master", "commit": "a5b3d6aa1fe5fe75e6124927392a9d3a60a0ecce" }, - "nvim-nio": { "branch": "master", "commit": "8765cbc4d0c629c8158a5341e1b4305fd93c3a90" }, - "nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" }, + "nvim-lint": { "branch": "master", "commit": "e19842a05aae484957ad20710444757bc0a61d63" }, + "nvim-lspconfig": { "branch": "master", "commit": "38de86f82efd9ba0881203767d6a8e1815abca28" }, + "nvim-luapad": { "branch": "master", "commit": "176686eb616a5ada5dfc748f2b5109194bbe8a71" }, + "nvim-nio": { "branch": "master", "commit": "632024157d01e8bc48fd7df6a7de8ffe3fdd4f3a" }, + "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, "nvim-scrollbar": { "branch": "main", "commit": "35f99d559041c7c0eff3a41f9093581ceea534e8" }, - "nvim-surround": { "branch": "main", "commit": "6d0dc3dbb557bcc6a024969da461df4ba803fc48" }, - "nvim-treesitter": { "branch": "master", "commit": "99d3e799b46f5c2a1fc0d7a42d7ab452de48c067" }, - "nvim-web-devicons": { "branch": "master", "commit": "794bba734ec95eaff9bb82fbd112473be2087283" }, - "omnisharp-extended-lsp.nvim": { "branch": "main", "commit": "6e0aa6465f8fa8ac6c833f6ac4713adfee0202a0" }, + "nvim-surround": { "branch": "main", "commit": "03d3972f15ee4acbc997873202cbd6cb7e50b230" }, + "nvim-treesitter": { "branch": "master", "commit": "b91ae14fc3bb801c7ea69bc283fe860b32b5163d" }, + "nvim-web-devicons": { "branch": "master", "commit": "b77921fdc44833c994fdb389d658ccbce5490c16" }, + "omnisharp-extended-lsp.nvim": { "branch": "main", "commit": "f872cfa38b30a34e179fb028f68588d09bd44114" }, "onedark.nvim": { "branch": "main", "commit": "b5161f0c631571640485be5d1c059cab82c86872" }, - "persisted.nvim": { "branch": "main", "commit": "96bf597778a0dddf70f28cec2d2596f57afa3921" }, - "persistence.nvim": { "branch": "main", "commit": "4982499c1636eac254b72923ab826ee7827b3084" }, - "plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" }, + "persisted.nvim": { "branch": "main", "commit": "b77d244a77a46013fbf7e59d45d84d58df294dc1" }, + "persistence.nvim": { "branch": "main", "commit": "5fe077056c821aab41f87650bd6e1c48cd7dd047" }, + "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, "refactoring.nvim": { "branch": "master", "commit": "d2786877c91aa409c824f27b4ce8a9f560dda60a" }, "rustaceanvim": { "branch": "master", "commit": "bc8c4b8f7606d5b7c067cd8369e25c1a7ff77bd0" }, - "sonokai": { "branch": "master", "commit": "da162343354fbd9bf9cd49293a856f0e3761e8ac" }, + "sonokai": { "branch": "master", "commit": "da5b10020b9ca960f5a0296ab59ccc44f0d7718e" }, "tagalong.vim": { "branch": "main", "commit": "5a2bbf2b1d5b657685a49d48d98a4aa921c1fde3" }, "telescope-dap.nvim": { "branch": "master", "commit": "8c88d9716c91eaef1cdea13cb9390d8ef447dbfe" }, "telescope-import.nvim": { "branch": "main", "commit": "baa2d50be46c769a1cc942a9d5be049f314f4206" }, - "telescope.nvim": { "branch": "master", "commit": "2d0d057791854decb2c9b6a0b52d43f3900dff40" }, + "telescope.nvim": { "branch": "master", "commit": "dfa230be84a044e7f546a6c2b0a403c739732b86" }, "telescope_citc": { "branch": "main", "commit": "56eae89663154f0ccbd4bfd1259d4a56e383abb1" }, - "telescope_codesearch": { "branch": "main", "commit": "df85c7e53fa82fb6b3f35403f740175b7eb5f938" }, + "telescope_codesearch": { "branch": "main", "commit": "f9fa65aaf00188be8e9374fc34f586e96ce4ed55" }, "telescope_fig": { "branch": "main", "commit": "f6122fe82417ebeaddb9343cfd5584f62a4b8df8" }, "text-case.nvim": { "branch": "main", "commit": "d62c63a4e9a996c7321885937ab89920fca2c1c8" }, "time-ago.vim": { "branch": "master", "commit": "be978d5c790cfcc41f524205f28783b9937fd0ee" }, "tree-sitter-gdscript": { "branch": "master", "commit": "1f1e782fe2600f50ae57b53876505b8282388d77" }, - "trouble.nvim": { "branch": "main", "commit": "b9cf677f20bb2faa2dacfa870b084e568dca9572" }, + "trouble.nvim": { "branch": "main", "commit": "a8264a65a0b894832ea642844f5b7c30112c458f" }, "undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" }, "vcscommand.vim": { "branch": "master", "commit": "2fb32681361f37533455d20aaa7fc6eb11b0fa4b" }, "vim-bazel": { "branch": "master", "commit": "31b0d5e4f51da1aeb56d65bf505a744e6de405de" }, "vim-better-whitespace": { "branch": "master", "commit": "029f35c783f1b504f9be086b9ea757a36059c846" }, "vim-conjoin": { "branch": "master", "commit": "2ea3b8ed994d12bbf255825d973d865621c64860" }, "vim-floaterm": { "branch": "master", "commit": "4e28c8dd0271e10a5f55142fb6fe9b1599ee6160" }, - "vim-illuminate": { "branch": "master", "commit": "e522e0dd742a83506db0a72e1ced68c9c130f185" }, + "vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" }, "vim-imp": { "branch": "main", "commit": "fe9be485854ba602059f0d8af4fa4ab0a74d61ac" }, "vim-maktaba": { "branch": "master", "commit": "fe95bb10f6bb250943a44632107f6a3d76ce5f28" }, - "vim-matchup": { "branch": "master", "commit": "2d660e4aa7c566014c667af2cda0458043527902" }, + "vim-matchup": { "branch": "master", "commit": "1535a769d5dca851fe7d41b0be95f7c7203a4bef" }, "vim-signify": { "branch": "master", "commit": "8670143f9e12ed1cd3c9b2c54f345cdd9a4baac3" }, "vim-tmux": { "branch": "master", "commit": "cfe76281efc29890548cf9eedd42ad51c7a1faf0" }, "vim-tmux-focus-events": { "branch": "master", "commit": "b1330e04ffb95ede8e02b2f7df1f238190c67056" }, - "vim-tmux-navigator": { "branch": "master", "commit": "a26954a585b02a2ac02f87145e204f8798a7cbc2" }, + "vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" }, "vim-tmux-syntax": { "branch": "master", "commit": "1b6a6a5beb96fa232c8d35d305f77496b12678a9" }, "vimux": { "branch": "master", "commit": "f7c41607d9246ec4b6cc28587cce84d75d106e3e" }, "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }, diff --git a/google/.blazerc b/google/.blazerc index 6d1497a..155f4d1 100644 --- a/google/.blazerc +++ b/google/.blazerc @@ -43,7 +43,7 @@ test --test_output=all --test_summary=detailed --build_tests_only import %workspace%/java/com/google/android/gmscore/blaze/blazerc # build --config=gmscore_arm64 -# test --config=gmscore_test +test --config=gmscore_test # # https://g3doc.corp.google.com/devtools/blaze/g3doc/faq.md?cl=head#BlazeOom startup --host_jvm_args=-Xmx18G --host_jvm_args=-Xms18G diff --git a/vim/.vim/lua/config/lsp-google.lua b/vim/.vim/lua/config/lsp-google.lua index 4dfacec..dc90f51 100644 --- a/vim/.vim/lua/config/lsp-google.lua +++ b/vim/.vim/lua/config/lsp-google.lua @@ -7,6 +7,7 @@ function M.setup(capabilities) local configs = require("lspconfig.configs") configs.ciderlsp = { default_config = { + offset_encoding = "utf-16", cmd = { "/google/bin/releases/cider/ciderlsp/ciderlsp", "--tooltag=nvim-lsp", @@ -26,7 +27,7 @@ function M.setup(capabilities) "bzl", "typescript", }, - root_dir = lspconfig.util.root_pattern("BUILD"), + root_dir = lspconfig.util.root_pattern("google3/*BUILD"), settings = {}, }, } diff --git a/vim/.vim/lua/plugins/base.lua b/vim/.vim/lua/plugins/base.lua index 4cda489..6892ab4 100644 --- a/vim/.vim/lua/plugins/base.lua +++ b/vim/.vim/lua/plugins/base.lua @@ -33,7 +33,7 @@ return { "Subs", }, keys = { - { "t", "TextCaseOpenTelescope", mode = { "n", "v" }, desc = "Telescope" }, + { "tc", "TextCaseOpenTelescope", mode = { "n", "v" }, desc = "Telescope" }, }, }, { @@ -74,21 +74,6 @@ return { cmd = { "AerialToggle", "AerialOn" }, keys = { { "so", ":AerialToggle", desc = "[S]symbols [O]utline" } }, }, - { - "olimorris/persisted.nvim", - config = function() - require("persisted").setup({}) - require("telescope").load_extension("persisted") - end, - }, - { - "iamcco/markdown-preview.nvim", - build = "cd app && npm install", - init = function() - vim.g.mkdp_filetypes = { "markdown" } - end, - ft = { "markdown" }, - }, { "andrewferrier/debugprint.nvim", opts = {}, diff --git a/vim/.vim/lua/plugins/cmp.lua b/vim/.vim/lua/plugins/cmp.lua index a80bd59..ce47d41 100644 --- a/vim/.vim/lua/plugins/cmp.lua +++ b/vim/.vim/lua/plugins/cmp.lua @@ -41,6 +41,8 @@ return { vim.opt.completeopt = { "menu", "menuone", "noselect" } local cmp = require("cmp") + local luasnip = require("luasnip") + local compare = cmp.config.compare local conditionalSources = {} @@ -55,6 +57,30 @@ return { local lspkind = require("lspkind") lspkind.init() + vim.api.nvim_create_autocmd("FileType", { + callback = function(args) + local max_filesize = 100 * 1024 -- 100 KB + local fname = vim.api.nvim_buf_get_name(args.buf) + local ok, stats = pcall(vim.loop.fs_stat, fname) + if ok and stats and stats.size > max_filesize then + vim.schedule(function() + vim.notify( + string.format( + "Disabling nvim-cmp for buffer. File %s exceeds maximum configured size.", + fname + ) + ) + end) + require("cmp").setup.buffer({ + enabled = false, + }) + end + end, + }) + + cmp.setup.filetype("txt", { + enabled = false, + }) -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). cmp.setup.cmdline({ "/", "?" }, { @@ -76,6 +102,14 @@ return { cmp.setup({ preselect = cmp.PreselectMode.None, + performance = { + -- debounce = 60, + -- throttle = 30, + fetching_timeout = 300, + -- confirm_resolve_timeout = 80, + -- async_budget = 1, + -- max_view_entries = 200, + }, sources = cmp.config.sources( require("utils").TableConcat(conditionalSources, { -- { name = "nvim_lsp_signature_help", priority = 9 }, @@ -136,35 +170,40 @@ return { end, }, - experimental = { - native_menu = false, - ghost_text = true, - }, mapping = { [""] = cmp.mapping.scroll_docs(-4), [""] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping.close(), [""] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), - [""] = cmp.mapping.confirm({ select = true }), - [""] = cmp.mapping(function(fallback) + [""] = cmp.mapping(function(fallback) if cmp.visible() then - if #cmp.get_entries() == 1 then - cmp.confirm({ select = true }) + if luasnip.expandable() then + luasnip.expand() else - cmp.select_next_item() - end - elseif has_words_before() then - cmp.complete() - if #cmp.get_entries() == 1 then - cmp.confirm({ select = true }) + cmp.confirm({ + select = true, + }) end else fallback() end + end), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.locally_jumpable(1) then + luasnip.jump(1) + else + fallback() + end end, { "i", "s" }), - [""] = cmp.mapping(function() + [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() + elseif luasnip.locally_jumpable(-1) then + luasnip.jump(-1) + else + fallback() end end, { "i", "s" }), diff --git a/vim/.vim/lua/plugins/lsp.lua b/vim/.vim/lua/plugins/lsp.lua index 21a6a32..5269282 100644 --- a/vim/.vim/lua/plugins/lsp.lua +++ b/vim/.vim/lua/plugins/lsp.lua @@ -70,8 +70,18 @@ return { require("go").setup({ capabilities = capabilities, }) + -- Run gofmt + goimports on save + + local format_sync_grp = vim.api.nvim_create_augroup("goimports", {}) + vim.api.nvim_create_autocmd("BufWritePre", { + pattern = "*.go", + callback = function() + require("go.format").goimports() + end, + group = format_sync_grp, + }) end, - event = { "VeryLazy" }, + event = { "CmdlineEnter" }, ft = { "go", "gomod" }, build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries }, @@ -123,16 +133,6 @@ return { }) vim.cmd([[autocmd FileType gdscript setlocal commentstring=#\ %s]]) vim.cmd([[autocmd FileType gdscript setlocal autoindent noexpandtab tabstop=4 shiftwidth=4]]) - - -- Run gofmt + goimports on save - local format_sync_grp = vim.api.nvim_create_augroup("goimports", {}) - vim.api.nvim_create_autocmd("BufWritePre", { - pattern = "*.go", - callback = function() - require("go.format").goimports() - end, - group = format_sync_grp, - }) end, }, } diff --git a/vim/.vim/lua/plugins/mason.lua b/vim/.vim/lua/plugins/mason.lua index 9e59f17..eb56228 100644 --- a/vim/.vim/lua/plugins/mason.lua +++ b/vim/.vim/lua/plugins/mason.lua @@ -16,6 +16,7 @@ return { "bashls", "dotls", "golangci_lint_ls", + "gopls", } if not use_google() then diff --git a/vim/.vim/lua/plugins/nvim-treesitter.lua b/vim/.vim/lua/plugins/nvim-treesitter.lua index 109fbc0..67fbeab 100644 --- a/vim/.vim/lua/plugins/nvim-treesitter.lua +++ b/vim/.vim/lua/plugins/nvim-treesitter.lua @@ -49,14 +49,14 @@ return { return true end - local max_filesize = 200 * 1024 -- 200 KB + local max_filesize = 100 * 1024 -- 100 KB local fname = vim.api.nvim_buf_get_name(buf) local ok, stats = pcall(vim.loop.fs_stat, fname) if ok and stats and stats.size > max_filesize then vim.schedule(function() vim.notify( string.format( - "Disabling treesitter. File %s exceeds maximum configured size.", + "Disabling treesitter for buffer. File %s exceeds maximum configured size.", fname ) ) diff --git a/vim/.vim/lua/plugins/nvim-treesitter.lua.orig b/vim/.vim/lua/plugins/nvim-treesitter.lua.orig deleted file mode 100644 index 980fa10..0000000 --- a/vim/.vim/lua/plugins/nvim-treesitter.lua.orig +++ /dev/null @@ -1,75 +0,0 @@ -return { - "PrestonKnopp/tree-sitter-gdscript", - { - "nvim-treesitter/nvim-treesitter-context", - config = function() - require("treesitter-context").setup({ - enable = true, -- Enable this plugin (Can be enabled/disabled later via commands) - max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit. - min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit. - line_numbers = true, - multiline_threshold = 20, -- Maximum number of lines to show for a single context - trim_scope = "outer", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer' - mode = "cursor", -- Line used to calculate context. Choices: 'cursor', 'topline' - -- Separator between context and content. Should be a single character string, like '-'. - -- When separator is set, the context will only show up when there are at least 2 lines above cursorline. - separator = nil, - zindex = 20, -- The Z-index of the context window - on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching - }) - end, - }, - { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - config = function() - require("nvim-treesitter.configs").setup({ - -- A list of parser names, or "all" (the five listed parsers should always be installed) - ensure_installed = "all", - - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, - - -- Automatically install missing parsers when entering buffer - -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally - auto_install = false, - - indent = { enable = true }, - -- List of parsers to ignore installing (or "all") - -- ignore_install = { "" }, - - ---- If you need to change the installation directory of the parsers (see -> Advanced Setup) - -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")! - - highlight = { - enable = true, - - -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to - -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is - -- the name of the parser) - -- list of language that will be disabled - -- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files - disable = function(lang, buf) - --TODO write a custom Java treesitter parser for comments - --@link - -- - -- if lang == "java" then - -- return true - -- end - - local max_filesize = 100 * 1024 -- 100 KB - local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) - if ok and stats and stats.size > max_filesize then - return true - end - end, - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = { "java", "kotlin" }, - }, - }) - end, - lazy = false, -} diff --git a/vim/.vim/lua/plugins/scroll.lua b/vim/.vim/lua/plugins/scroll.lua index 3954a6b..0356b7f 100644 --- a/vim/.vim/lua/plugins/scroll.lua +++ b/vim/.vim/lua/plugins/scroll.lua @@ -30,22 +30,22 @@ return { end, lazy = false, }, - { - "kevinhwang91/nvim-hlslens", - config = function() - require("hlslens").setup({ - nearest_only = true, - build_position_cb = function(plist, _, _, _) - require("scrollbar.handlers.search").handler.show(plist.start_pos) - end, - }) - - vim.cmd([[ - augroup scrollbar_search_hide - autocmd! - autocmd CmdlineLeave : lua require('scrollbar.handlers.search').handler.hide() - augroup END - ]]) - end, - }, + -- { + -- "kevinhwang91/nvim-hlslens", + -- config = function() + -- require("hlslens").setup({ + -- nearest_only = true, + -- build_position_cb = function(plist, _, _, _) + -- require("scrollbar.handlers.search").handler.show(plist.start_pos) + -- end, + -- }) + -- + -- vim.cmd([[ + -- augroup scrollbar_search_hide + -- autocmd! + -- autocmd CmdlineLeave : lua require('scrollbar.handlers.search').handler.hide() + -- augroup END + -- ]]) + -- end, + -- }, }