glyph / python-docstring-mode

Emacs minor-mode for editing Python docstrings.
MIT License
70 stars 22 forks source link

tree-sitter compatibility #34

Closed glyph closed 1 year ago

glyph commented 1 year ago

python-ts-mode seems to work OK with the highlighting, but docstring filling is badly broken

glyph commented 1 year ago

I think that this will be waaaaaay easier than the shenanigans we are doing with syntax-ppss; we should be able to just do something like


(defun pdm-bracket-docstring ()
  (let* ((the-node (treesit-node-at (point)))
         (start (treesit-node-start the-node))
         (end (treesit-node-end the-node)))
    (cons start end)
    ))