nvim: get more plugin stuff working

This commit is contained in:
Kate 2025-05-22 21:31:22 +02:00
parent ad42c1751d
commit 0b3ff15688
6 changed files with 101 additions and 123 deletions

View file

@ -1,3 +1,11 @@
-- Autocmds are automatically loaded on the VeryLazy event -- Autocmds are automatically loaded on the VeryLazy event
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua -- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
-- Add any additional autocmds here -- Add any additional autocmds here
vim.api.nvim_create_autocmd("ColorScheme", {
pattern = "*",
callback = function()
vim.api.nvim_set_hl(0, "SnacksPicker", { bg = "none", nocombine = true })
vim.api.nvim_set_hl(0, "SnacksPickerBorder", { fg = "#316c71", bg = "none", nocombine = true })
end,
})

View file

@ -0,0 +1,3 @@
vim.api.nvim_set_hl(0, "SnacksPicker", { bg = "NONE" })
SPLAT

View file

@ -1,37 +0,0 @@
return {
"nvimdev/dashboard-nvim",
opts = function()
local logo = [[
]]
logo = "\n\n" .. logo
return {
change_to_vcs_root = true,
config = {
header = vim.split(logo, "\n"),
footer = {
"",
"You are accessing a Tactile Metrology LLC information system, which includes: ",
"(1) this computer, (2) this computer network, (3) all computers connected to this ",
"network, and (4) all devices and storage media attached to this network or to a ",
"computer on this network. ",
"",
"This information system is provided so that you may be gay, and do crime. ",
"",
"Unauthorized or improper use of this system had better be pretty frickin' awesome.",
},
shortcut = {
{ desc = "[ deprekated]", group = "DashboardShortCut" },
{ desc = "[ Kate Adkins]", group = "DashboardShortCut" },
{ desc = "[󱄅 powered by Lix]", group = "DashboardShortCut" },
},
},
}
end,
}

View file

@ -1,16 +1,16 @@
return { return {
{ {
"lifepillar/vim-solarized8", "lifepillar/vim-solarized8",
lazy = false, lazy = false,
priority = 1000, priority = 1000,
config = function() config = function()
vim.cmd([[ vim.cmd([[
colorscheme solarized8 colorscheme solarized8
" Make Solarized8 a biiiit darker. " Make Solarized8 a biiiit darker.
highlight Normal guibg=#001E27 highlight Normal guibg=#001E27
highlight LineNR ctermfg=11 guibg=#0B262D highlight LineNR ctermfg=11 guibg=#0B262D
]]) ]])
end, end,
}, },
} }

View file

@ -1,80 +1,84 @@
{ return {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
version = false, -- last release is way too old and doesn't work on Windows version = false, -- last release is way too old and doesn't work on Windows
build = ":TSUpdate", build = ":TSUpdate",
event = { "LazyFile", "VeryLazy" }, event = { "LazyFile", "VeryLazy" },
lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline
init = function(plugin) init = function(plugin)
-- PERF: add nvim-treesitter queries to the rtp and it's custom query predicates early -- PERF: add nvim-treesitter queries to the rtp and it's custom query predicates early
-- This is needed because a bunch of plugins no longer `require("nvim-treesitter")`, which -- This is needed because a bunch of plugins no longer `require("nvim-treesitter")`, which
-- no longer trigger the **nvim-treesitter** module to be loaded in time. -- no longer trigger the **nvim-treesitter** module to be loaded in time.
-- Luckily, the only things that those plugins need are the custom queries, which we make available -- Luckily, the only things that those plugins need are the custom queries, which we make available
-- during startup. -- during startup.
require("lazy.core.loader").add_to_rtp(plugin) require("lazy.core.loader").add_to_rtp(plugin)
require("nvim-treesitter.query_predicates") require("nvim-treesitter.query_predicates")
end, end,
cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" }, cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" },
keys = { keys = {
{ "<c-space>", desc = "Increment Selection" }, { "<c-space>", desc = "Increment Selection" },
{ "<bs>", desc = "Decrement Selection", mode = "x" }, { "<bs>", desc = "Decrement Selection", mode = "x" },
},
opts_extend = { "ensure_installed" },
---@type TSConfig
---@diagnostic disable-next-line: missing-fields
opts = {
highlight = { enable = true },
indent = { enable = true },
ensure_installed = {
"bash",
"c",
"diff",
"html",
"javascript",
"jsdoc",
"json",
"jsonc",
"lua",
"luadoc",
"luap",
"markdown",
"markdown_inline",
"nix",
"printf",
"python",
"query",
"regex",
"toml",
"tsx",
"typescript",
"vim",
"vimdoc",
"xml",
"yaml",
}, },
incremental_selection = { opts_extend = { "ensure_installed" },
enable = true, ---@type TSConfig
keymaps = { ---@diagnostic disable-next-line: missing-fields
init_selection = "<C-space>", opts = {
node_incremental = "<C-space>", highlight = { enable = true },
scope_incremental = false, indent = { enable = true },
node_decremental = "<bs>", ensure_installed = {
}, "bash",
"c",
"diff",
"html",
"javascript",
"jsdoc",
"json",
"jsonc",
"lua",
"luadoc",
"luap",
"markdown",
"markdown_inline",
"nix",
"printf",
"python",
"query",
"regex",
"toml",
"tsx",
"typescript",
"vim",
"vimdoc",
"xml",
"yaml",
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "<C-space>",
node_incremental = "<C-space>",
scope_incremental = false,
node_decremental = "<bs>",
},
},
textobjects = {
move = {
enable = true,
goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" },
goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" },
goto_previous_start = {
["[f"] = "@function.outer",
["[c"] = "@class.outer",
["[a"] = "@parameter.inner",
},
goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" },
},
},
}, },
textobjects = { ---@param opts TSConfig
move = { config = function(_, opts)
enable = true, if type(opts.ensure_installed) == "table" then
goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" }, opts.ensure_installed = LazyVim.dedup(opts.ensure_installed)
goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" }, end
goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer", ["[a"] = "@parameter.inner" }, require("nvim-treesitter.configs").setup(opts)
goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" }, end,
},
},
},
---@param opts TSConfig
config = function(_, opts)
if type(opts.ensure_installed) == "table" then
opts.ensure_installed = LazyVim.dedup(opts.ensure_installed)
end
require("nvim-treesitter.configs").setup(opts)
end,
} }