Skip to content

Commit

Permalink
feat(treesitter): improve treesitter (#59)
Browse files Browse the repository at this point in the history
* feat(treesitter): improve php treesitter

* fix: diff

* fix: diagnostics
  • Loading branch information
gbprod authored Jan 24, 2024
1 parent 144374b commit d244ee7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lua/nord/defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ function defaluts.highlights()
diffAdded = { link = "DiffAdd" },
diffChanged = { link = "DiffChange" },
diffRemoved = { link = "DiffDelete" },
Added = { link = "DiffAdd" },
Changed = { link = "DiffChange" },
Removed = { link = "DiffDelete" },
healthError = { fg = c.aurora.red },
healthSuccess = { fg = c.aurora.green },
healthWarning = { fg = c.aurora.yellow },
Expand Down
1 change: 1 addition & 0 deletions lua/nord/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ function lsp.highlights()
-- LspReferenceRead = { bg = c.fg_gutter }, -- used for highlighting "read" references
-- LspReferenceWrite = { bg = c.fg_gutter }, -- used for highlighting "write" references

DiagnosticOk = { fg = c.aurora.green }, -- Used as the base highlight group. Other Diagnostic highlights link to this by default
DiagnosticError = { fg = c.aurora.red }, -- Used as the base highlight group. Other Diagnostic highlights link to this by default
DiagnosticWarn = { fg = c.aurora.yellow }, -- Used as the base highlight group. Other Diagnostic highlights link to this by default
DiagnosticInfo = { fg = c.frost.ice }, -- Used as the base highlight group. Other Diagnostic highlights link to this by default
Expand Down
7 changes: 6 additions & 1 deletion lua/nord/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ function treesitter.highlights()
["@text.danger"] = { fg = c.aurora.red }, -- danger/error notes
["@text.diff.add"] = { link = "DiffAdd" }, -- added text (for diff files)
["@text.diff.delete"] = { link = "DiffDelete" }, -- deleted text (for diff files)
["@diff.diff"] = { link = "DiffAdd" }, -- added text (for diff files)
["@diff.minus"] = { link = "DiffDelete" }, -- deleted text (for diff files)
["@diff.delta"] = { link = "DiffChange" },

-- Tags
["@tag"] = { fg = c.frost.artic_water }, -- XML tag names
Expand All @@ -106,9 +109,11 @@ function treesitter.highlights()

-- Language specific
["@constant.git_rebase"] = { fg = c.frost.polar_water },
["@field.yaml"] = { fg = c.frost.polar_water },
["@property.yaml"] = { fg = c.frost.polar_water },
["@text.phpdoc"] = { fg = c.polar_night.light },
["@attribute.phpdoc"] = { fg = c.frost.artic_water },
["@module.php"] = { fg = c.snow_storm.origin },
["@variable.parameter.php"] = { fg = c.frost.polar_water },

-- LSP Semantic Token Groups
["@lsp.type.class"] = { link = "@type" },
Expand Down

0 comments on commit d244ee7

Please sign in to comment.