This change introduces a distinction between true keywords and built-in 
identifiers for Nim syntax highlighting. Previously, the keyword list was a mix 
of both.

Details:
- LexNim: Add a second keyword list `builtin_identifiers`.
- LexNim: Assign new style `SCE_NIM_WORD2` to built-in identifiers.
- filetypes.nim: Move non-keyword entries into `builtin_identifiers`.
- filetypes.nim: Set style `keyword_2` for built-in identifiers.
- The implementation was roughly copied from the Python lexer.

Notes:
- The keyword list is taken from https://nim-lang.org/docs/manual.html.
- The built-in identifier list is derived from the remaining entries.
- To disable the distinction, set `word2=keyword_1` in `filetypes.nim`.
You can view, comment on, or merge this pull request online at:

  https://github.com/geany/geany/pull/4417

-- Commit Summary --

  * Nim language: Separate built-in identifiers from keywords

-- File Changes --

    M data/filedefs/filetypes.nim (7)
    M scintilla/lexilla/include/SciLexer.h (17)
    M scintilla/lexilla/lexers/LexNim.cxx (36)
    M src/highlightingmappings.h (2)

-- Patch Links --

https://github.com/geany/geany/pull/4417.patch
https://github.com/geany/geany/pull/4417.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/4417
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/4...@github.com>

Reply via email to