reduced package installations and plugin dependencies

This commit is contained in:
sgraves committed 2026-08-28 20:05:00 -05:00
1 parent d815813f9b
commit 085031114f
7 files changed
+77 -53

No files matched your search

+2
View File
@@ -211,6 +211,8 @@ NV_DARCULA_MASON_TOOL_LIST =
"NV_DARCULA_MASON_TOOL_LIST",
{
"clang-format",
"codespell",
"cpplint",
"delve",
"gofumpt",
"google-java-format",
+8 -2
View File
@@ -1206,11 +1206,17 @@ function M.toggle()
opts
)
-- Colorizer
-- Color highlighting
km.nmap(
km.leader2 "tc",
function()
vim.cmd("ColorizerToggle")
local hipatterns = require("mini.hipatterns")
local bufnr = vim.api.nvim_get_current_buf()
hipatterns.toggle(bufnr)
utils.notify_setting_enabled(
"Color highlighting",
vim.tbl_contains(hipatterns.get_enabled_buffers(), bufnr)
)
end,
opts
)
-4
View File
@@ -94,10 +94,6 @@ end
vim.list_extend(
packages,
{
{
src = "https://github.com/catgoose/nvim-colorizer.lua",
version = "85a5e83cd4daa258cf95c3204e277991d6fbe747"
},
{src = "https://github.com/dart-lang/dart-vim-plugin"},
{src = "https://github.com/dstein64/nvim-scrollview"},
{src = "https://github.com/kyazdani42/nvim-tree.lua"},
@@ -0,0 +1,67 @@
-- The MIT License (MIT)
--
-- Copyright © 2026 Scott E. Graves <scott.e.graves@protonmail.com>
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy of this software
-- and associated documentation files (the “Software”), to deal in the Software without restriction,
-- including without limitation the rights to use, copy, modify, merge, publish, distribute,
-- sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in all copies or
-- substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
-- BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--
local hipatterns = require("mini.hipatterns")
local color_group = function(_, match)
local hex = match
if #match == 4 or #match == 5 then
local red, green, blue = match:sub(2, 2), match:sub(3, 3), match:sub(4, 4)
hex = "#" .. red .. red .. green .. green .. blue .. blue
end
return hipatterns.compute_hex_color_group(hex:sub(1, 7), "bg")
end
local named_color_group = function(_, match)
-- Match colorizer's default of accepting lower- and CamelCase names, but
-- not names written entirely in uppercase.
if #match > 1 and match == match:upper() then
return nil
end
local ok, color = pcall(vim.api.nvim_get_color_by_name, match)
if not ok or color < 0 then
return nil
end
return hipatterns.compute_hex_color_group(
string.format("#%06x", color),
"bg"
)
end
hipatterns.setup(
{
highlighters = {
hex_color = hipatterns.gen_highlighter.hex_color(),
hex_short = {
pattern = {
"()#%x%x%x()%f[^%x]",
"()#%x%x%x%x()%f[^%x]"
},
group = color_group
},
named_color = {
pattern = "%f[%w]()[%a][%w]*()%f[^%w]",
group = named_color_group
}
}
}
)
-20
View File
@@ -1,20 +0,0 @@
-- The MIT License (MIT)
--
-- Copyright © 2026 Scott E. Graves <scott.e.graves@protonmail.com>
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy of this software
-- and associated documentation files (the “Software”), to deal in the Software without restriction,
-- including without limitation the rights to use, copy, modify, merge, publish, distribute,
-- sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in all copies or
-- substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
-- BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--
require("colorizer").setup()