update colors, sorting, lsp with treesitter

This commit is contained in:
Matt Anderson
2026-09-13 10:49:57 -05:00
parent 82314996f6
commit aaab135fea
7 changed files with 67 additions and 23 deletions
+4 -1
View File
@@ -12,6 +12,9 @@ vim.filetype.add({
pattern = {
["compose.*%.ya?ml"] = "yaml.docker-compose",
["docker%-compose.*%.ya?ml"] = "yaml.docker-compose",
[".*/templates/.*%.tpl"] = "helm",
[".*/templates/.*%.ya?ml"] = "helm",
["values.*%.ya?ml"] = "yaml.helm-values",
},
})
@@ -110,7 +113,7 @@ vim.lsp.config('yamlls', {
settings = {
yaml = {
schemas = {
kubernetes = "*.yaml",
["https://json.schemastore.org/chart.json"] = "Chart.yaml",
},
},
}
+53 -16
View File
@@ -18,7 +18,52 @@ require('lazy').setup({
'mfussenegger/nvim-dap',
'rcarriga/nvim-dap-ui',
'leoluz/nvim-dap-go',
'nvim-treesitter/nvim-treesitter',
{
'nvim-treesitter/nvim-treesitter',
lazy = false,
build = ':TSUpdate',
config = function()
local treesitter = require('nvim-treesitter')
-- Parsers for the languages enabled in lsp.lua. LESS, Objective-C++,
-- and the generic "template" filetype have no matching parser.
local parsers = {
'angular', 'bash', 'c', 'cpp', 'css', 'cuda', 'dockerfile',
'go', 'gomod', 'gotmpl', 'gowork', 'helm', 'html', 'htmldjango',
'javascript', 'json', 'lua', 'objc', 'python', 'scss',
'templ', 'tsx', 'typescript', 'yaml',
}
local ready = false
local function start_highlighting(buf)
if not ready or not vim.api.nvim_buf_is_loaded(buf) then
return
end
local lang = vim.treesitter.language.get_lang(vim.bo[buf].filetype)
if vim.list_contains(parsers, lang)
and vim.list_contains(treesitter.get_installed('parsers'), lang) then
vim.treesitter.start(buf, lang)
end
end
vim.api.nvim_create_autocmd('FileType', {
group = vim.api.nvim_create_augroup('UserTreesitter', { clear = true }),
callback = function(ev)
start_highlighting(ev.buf)
end,
})
treesitter.install(parsers):await(vim.schedule_wrap(function(err)
if err then
vim.notify('Tree-sitter installation failed: ' .. tostring(err), vim.log.levels.ERROR)
end
ready = true
-- Enable buffers opened while the first installation was running.
for _, buf in ipairs(vim.api.nvim_list_bufs()) do
start_highlighting(buf)
end
end))
end,
},
'luukvbaal/nnn.nvim',
'nvim-tree/nvim-tree.lua',
'lewis6991/gitsigns.nvim',
@@ -60,21 +105,21 @@ require('lazy').setup({
},
},
org_agenda_custom_commands = {
o = {
description = "Owned",
i = {
description = "Independent",
types = {
{
type = 'agenda',
org_agenda_tag_filter_preset = 'owned'
org_agenda_tag_filter_preset = 'independent'
}
}
},
a = {
description = "Assigned",
e = {
description = "Employment",
types = {
{
type = 'agenda',
org_agenda_tag_filter_preset = 'assigned'
org_agenda_tag_filter_preset = 'employment'
}
}
},
@@ -95,15 +140,7 @@ require('lazy').setup({
org_agenda_tag_filter_preset = 'habits'
}
}
},
l = {
description = "Agenda",
types = {
{
type = 'agenda',
}
}
},
}
}
})
end,