Skip to content

Odd syntax highlighting behavior #16

@allispaul

Description

@allispaul

I'm noticing two weird things when font-lock-mode and cuda-mode are both enabled, both shown in the attached screenshot:

  1. Identifiers only get font-lock-variable-name-face starting at the letter before the first underscore.
  2. Identifiers before * often get font-lock-type-face (presumably, * is being interpreted as always the indirection operator, even when it's actually multiplication.)
    Screenshot from 2024-08-14 17-31-44
    Here's what it looks like (the expected behavior) when I switch to c-mode:
    image

I'm using emacs 29.4, Spacemacs develop, and the latest commit of this package. Here are the other modes I have active, though the fact that the behavior doesn't show up in c-mode suggests to me that it's a cuda-mode issue.

Minor modes enabled in this buffer: Anzu Auto-Save Bug-Reference-Prog Company
Display-Line-Numbers Eldoc Evil-Local Evil-Mc Evil-Surround Flycheck Font-Lock
Goto-Address-Prog Highlight-Numbers Highlight-Parentheses Hl-Todo Hs
Lsp-Completion Lsp-Diagnostics Lsp-Headerline-Breadcrumb Lsp-Managed Lsp
Lsp-Modeline-Code-Actions Lsp-Modeline-Diagnostics Lsp-Modeline-Workspace-Status
Lsp-Ui-Doc Lsp-Ui Lsp-Ui-Sideline Origami Rainbow-Delimiters Show-Smartparens
Smartparens Spacemacs-Leader-Override Undo-Tree Vi-Tilde-Fringe Yas

Global minor modes enabled: Tex-Source-Correlate Async-Bytecomp-Package
Auto-Encryption Clean-Aindent Dap-Auto-Configure Dap Dap-Tooltip Dap-Ui-Controls
Dap-Ui-Many-Windows Dap-Ui Editorconfig Electric-Indent Eval-Sexp-Fu-Flash
Evil-Escape Evil Eyebrowse File-Name-Shadow Flycheck-Pos-Tip Global-Anzu
Global-Auto-Revert Global-Display-Line-Numbers Global-Eldoc Global-Evil-Surround
Global-Flycheck Global-Font-Lock Global-Hl-Line Global-Hl-Todo
Global-Page-Break-Lines Global-Spacemacs-Leader-Override Global-Undo-Tree
Global-Vi-Tilde-Fringe Helm-Descbinds Helm-Minibuffer-History Helm
Hidden-Mode-Line Ido-Vertical Persp Projectile Pupo Purpose Pyvenv
Pyvenv-Tracking Recentf Save-Place Savehist Server Show-Paren
Show-Smartparens-Global Spaceline-Helm Spaceline-Info Tooltip Transient-Mark
Treemacs-Filewatch Treemacs-Follow Treemacs-Fringe-Indicator
Treemacs-Icons-Dired Volatile-Highlights Which-Key Winner Winum Xterm-Mouse
Yas-Global```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions