]> git.eshelyaron.com Git - emacs.git/commit
Eglot: supported nested {} patterns in globs
authorJoão Távora <joaotavora@gmail.com>
Mon, 15 Jul 2024 18:13:12 +0000 (19:13 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 17 Jul 2024 21:54:16 +0000 (23:54 +0200)
commitb442a23ece48bae6f19ece55d31ab87750142e7b
treebc7f64b21383f502f70baf306c1a5660d9c2cb4b
parente371bd58a25c2914b12446f56539dabebb554677
Eglot: supported nested {} patterns in globs

The tailwindcss-language server issues patterns like this:

   **/{tailwind,tailwind.config,tailwind.*.config,\
   tailwind.config.*}.{js,cjs,ts,mjs}

Notive the nested "*" blob inside the the {} group.

Eglot used to reject them in 'workspace/didChangeWatchedFiles' requests,
responding with "Internal Error".  This could confuse some servers.  Now
I've done some changes to the state machine generation and it supports
them.

* lisp/progmodes/eglot.el (eglot--glob-parse): Relax parser.
(eglot--glob-fsm): New helper.
(eglot--glob-compile, eglot--glob-emit-{}): Use it.

* test/lisp/progmodes/eglot-tests.el (eglot-test-glob-test):
Uncomment some test cases.

Github-reference: https://github.com/joaotavora/eglot/issues/1403
(cherry picked from commit d7b93f63f6923f13fe999d12c4f0ba1dbf7160a8)
lisp/progmodes/eglot.el
test/lisp/progmodes/eglot-tests.el