ZIm/crates/languages/src
Carroll Wainwright fb6c987e3e
python: Improve function syntax highlighting (#20487)
Release Notes:

- Differentiate between function and method calls and definitions.
`function.definition` matches the highlight for e.g. rust,
`function.call` is new.
- Likewise differentiate between class calls and class definitions.
- Better highlighting of function decorators (the `@` symbol is
punctuation, and now the decorator itself has a `function.decorator`
tag)
- Make `cls` a special variable (like `self`)
- Add `ellipsis` as a built-in constant

Note that most themes do not currently make use of the
`function.definition` tags, and none make use of the
`type.class.definition` tag. Hopefully more themes will pick this up.

*Before:*
<img width="248" alt="image"
src="https://github.com/user-attachments/assets/550ccd3d-594c-413a-b543-ef9caf39eee1">


*After:*
<img width="245" alt="image"
src="https://github.com/user-attachments/assets/47aa43b1-006b-4f9f-9029-510880f390ea">
2024-11-19 00:05:39 +01:00
..
bash Add autoclosing braces for Shell Scripts (#20278) 2024-11-06 11:05:59 -05:00
c Add inclusive range scope overrides. Don't auto-close quotes at the ends of line comments (#20206) 2024-11-04 15:36:39 -08:00
cpp Add inclusive range scope overrides. Don't auto-close quotes at the ends of line comments (#20206) 2024-11-04 15:36:39 -08:00
css Add inclusive range scope overrides. Don't auto-close quotes at the ends of line comments (#20206) 2024-11-04 15:36:39 -08:00
diff Add Diff language (#19129) 2024-10-15 16:02:12 -04:00
go Add inclusive range scope overrides. Don't auto-close quotes at the ends of line comments (#20206) 2024-11-04 15:36:39 -08:00
gomod File context for assistant panel (#9712) 2024-03-29 13:55:01 -07:00
gowork File context for assistant panel (#9712) 2024-03-29 13:55:01 -07:00
javascript Highlight ? and : in ternary expressions as operator in JavaScript, TypeScript, and TSX (#20573) 2024-11-16 13:42:10 +02:00
jsdoc Clean up whitespace (#10755) 2024-04-23 13:31:21 -04:00
json Add escape string highlights to JSON and JSONC files (#18138) 2024-09-20 12:20:14 -04:00
jsonc Add escape string highlights to JSON and JSONC files (#18138) 2024-09-20 12:20:14 -04:00
markdown Fix two auto-indent issues with Markdown and YAML (#20193) 2024-11-04 12:29:38 -08:00
markdown-inline Hide Markdown-Inline language from users with a new 'hidden' flag on language configs (#17104) 2024-08-29 11:23:33 -07:00
python python: Improve function syntax highlighting (#20487) 2024-11-19 00:05:39 +01:00
regex Improve syntax highlights (#18728) 2024-10-09 19:25:46 +02:00
rust Add inclusive range scope overrides. Don't auto-close quotes at the ends of line comments (#20206) 2024-11-04 15:36:39 -08:00
tsx Highlight ? and : in ternary expressions as operator in JavaScript, TypeScript, and TSX (#20573) 2024-11-16 13:42:10 +02:00
typescript Highlight ? and : in ternary expressions as operator in JavaScript, TypeScript, and TSX (#20573) 2024-11-16 13:42:10 +02:00
yaml Fix two auto-indent issues with Markdown and YAML (#20193) 2024-11-04 12:29:38 -08:00
bash.rs tasks: Expose captured variables to ContextProvider (#12134) 2024-05-22 19:45:43 +02:00
c.rs language servers: Fix wrong language server name (#20428) 2024-11-11 10:18:38 +01:00
css.rs language servers: Fix wrong language server name (#20428) 2024-11-11 10:18:38 +01:00
go.rs Use the project env when running LSPs (#20641) 2024-11-14 12:26:55 -07:00
json.rs language servers: Fix wrong language server name (#20428) 2024-11-11 10:18:38 +01:00
lib.rs python: Add pylsp as the secondary language server (#20358) 2024-11-12 17:23:40 +01:00
python.rs python: Prefer conda environments that match CONDA_PREFIX (#20702) 2024-11-15 09:12:35 +01:00
rust.rs Fix Rust LSP adapter on FreeBSD (#20736) 2024-11-15 11:03:55 -07:00
tailwind.rs tailwind: Allow configuring the rootFontSize (#20500) 2024-11-11 17:13:00 +01:00
typescript.rs Fix Linux rust-analyzer downloads in Preview (#20718) 2024-11-15 11:57:54 +02:00
vtsls.rs language servers: Fix wrong language server name (#20428) 2024-11-11 10:18:38 +01:00
yaml.rs language servers: Fix wrong language server name (#20428) 2024-11-11 10:18:38 +01:00