Skip to content

Commit

Permalink
fix(module): remove TS prefix from cmp links
Browse files Browse the repository at this point in the history
  • Loading branch information
EdenEast committed Apr 12, 2023
1 parent fbc610f commit 669b0ce
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions lua/nightfox/group/modules/cmp.lua
Expand Up @@ -3,6 +3,7 @@
local M = {}

function M.get(spec, config, opts)
local has_ts = config.modules.treesitter
local syn = spec.syntax

-- stylua: ignore
Expand All @@ -20,8 +21,8 @@ function M.get(spec, config, opts)

CmpItemKindKeyword = { link = "Identifier" },

CmpItemKindVariable = { link = "TSVariable" },
CmpItemKindConstant = { link = "TSConstant" },
CmpItemKindVariable = { link = has_ts and "@variable" or "Identifier" },
CmpItemKindConstant = { link = has_ts and "@constant" or "Constant" },
CmpItemKindReference = { link = "Keyword" },
CmpItemKindValue = { link = "Keyword" },

Expand All @@ -37,12 +38,12 @@ function M.get(spec, config, opts)
CmpItemKindClass = { link = "Type" },
CmpItemKindStruct = { link = "Type" },

CmpItemKindModule = { link = "TSNamespace" },
CmpItemKindModule = { link = has_ts and "@namespace" or "Identifier" },

CmpItemKindProperty = { link = "TSProperty" },
CmpItemKindField = { link = "TSField" },
CmpItemKindTypeParameter = { link = "TSField" },
CmpItemKindEnumMember = { link = "TSField" },
CmpItemKindProperty = { link = has_ts and "@property" or "Identifier" },
CmpItemKindField = { link = has_ts and "@field" or "Identifier" },
CmpItemKindTypeParameter = { link = has_ts and "@field" or "Identifier" },
CmpItemKindEnumMember = { link = has_ts and "@field" or "Identifier" },
CmpItemKindOperator = { link = "Operator" },
CmpItemKindSnippet = { fg = spec.fg2 },
}
Expand Down

0 comments on commit 669b0ce

Please sign in to comment.