summaryrefslogtreecommitdiff
path: root/rc/filetype/python.kak
AgeCommit message (Collapse)Author
2024-06-11Tweak python block command test location and remove wall of textMaxime Coste
We do not typically go into lengthy explanation of the code in the support scripts. This would have a performance impact (as comments are not trimmed in advance) and feels out of place.
2024-06-07Support paragraph breaks in python block comments.Simon Fowler
The current python filetype module treats a single empty comment line (typically created by hitting enter twice while in a block comment) as the end of a block comment, deleting the empty comment and ending comment prefix copying. This runs contrary to PEP8, which explicitly allows for paragraphs in block comments, with an empty comment as the paragraph separator. This change implements support for using a single empty comment as a paragraph separator, with two consecutive empty comments being treated as the end of the block comment; both empty comment lines are deleted and comment prefix copying is ended.
2023-04-02Delete commenting prefix on empty lines in PythonAdrià Arrufat
2022-12-17Add Python f-string interpolation highlightsRăzvan C. Rădulescu
2022-07-05Move user mappings to <space> and keep/remove selection to ,Maxime Coste
2022-07-05Make `x` just select the full linesMaxime Coste
`x` is often criticized as hard to predict due to its slightly complex behaviour of selecting next line if the current one is fully selected. Change `x` to use the previous `<a-x>` behaviour, and change `<a-x>` to trim to fully selected lines as `<a-X>` did. Adapt existing indentation script to the new behaviour
2021-10-24Add new '_', 'case', and 'match' keywords to Python highlighterLXNN
2021-04-17rc: make insertion hooks more consistentJohannes Altmanninger
2020-11-23Python: change face for documentation to documentation.Michał Kruszewski
2020-11-23Fix test and re-add triple_string support in python highlightingMaxime Coste
Triple strings are now distinct from docstrings, triple strings only preceeded by blanks on the line are considered docstrings. Avoid highlighting of the closing marker using a lookahead, this is not fully correct as it will break on a double quote triple docstring containing a single quote triple string but that seems improbable enough; if we encounter this in the wild we can split the two docstring formats into separate regions.
2020-11-20Python: Highlight docstrings with documentation face, not string.Michał Kruszewski
2020-09-15Fix python docstring highlighterPiotr Chrominski
Escaped ' or " at the end of a docstring no longer break highlighting.
2020-09-02python.kak: Do not indent after comments ending in :Johannes Altmanninger
Fixes #3693 This will not work for lines like the one below but I think that's okay because it does work for most comments. foo() # foo:
2020-08-12Add assignment expression := (walrus) operatorCem Aksoylar
2020-08-12Fix <> and ** operators highlightingCem Aksoylar
2020-07-31Fix invalid quoting in python.kakMaxime Coste
2020-07-29Fix my issues in python.kakJohn Isom
2020-07-29Fix deindentation in python.kakJohn Isom
2020-05-30Fix python attributes highlight.Michał Kruszewski
2020-05-19Split python auto-insert hooks from auto-indentMaxime Coste
2020-01-29rc: Highlight embedded documentationFrank LENORMAND
This commit adds a `documentation` face to the builtin themes, used to highlight common documentation syntaxes: /** * JavaDoc */ /*! * QtDoc */ /// Inline documentation ## Inline documentation The face is only an alias to the `comment` one for now. Closes #1944
2019-10-27Fix python operator highlightercipharius
2019-10-23Merge remote-tracking branch 'lenormf/python-highlight-module'Maxime Coste
2019-10-22src: Create a <semicolon> named keyFrank LENORMAND
This commit allows using the <semicolon> expansion in commands, instead of `\;`. It makes commands look more elegant, and prevents new-comers from falling into the trap of using <a-;> without escaping the semicolon.
2019-10-20rc python: Highlight modules in import statementsFrank LENORMAND
2019-10-16Replace ModeChange hooks by ModePush and ModePopMaxime Coste
Remove deprecated InsertBegin, InsertEnd, NormalBegin, NormalEnd hooks. Closes #2545
2019-07-26rc python: Highlight indented decorators with `.`Frank LENORMAND
Make sure decorators are on their own line, and don't stop highlighting at the first dot when they are imported, e.g. ``` import enum @enum.unique class A(enum.Enum): … ``` Ideally highlighting shouldn't stop at the first parenthesis either (e.g. `@foo(['1'])`), but the current code somewhat highlights the contents of the parens already, which is good enough in most cases.
2019-04-09Fixed many of the filetype support modules to not use `BufSetOption` to loadJustin Frank
2019-04-08Modified a bunch of language support files to use modulesJustin Frank
2019-04-04Add Python 3.7 breakpoint to list of built-in functions.Hampus Fröjdholm
2019-03-21Add categories in rc/Alex Leferry 2
Closes #2783