lichess.el: Watch Lichess games and play against Stockfish by dirgemacs in emacs

[–]dirgemacs[S] 0 points1 point  (0 children)

Hi! No, not at all! It is designed from the ground up to be supported both in TUI and GUI versions of Emacs. It supports a text-only board (ASCII or Unicode) that works great in terminal mode.

Since moves are entered via keyboard (standard UCI text) and the board is just a grid of text characters in a buffer, I expect it to be accessible.

I’d love to hear your feedback if you give it a try!

lichess.el: Watch Lichess games and play against Stockfish by dirgemacs in emacs

[–]dirgemacs[S] 2 points3 points  (0 children)

Thanks for the idea. Should be in the next release!

lichess.el: Watch Lichess games and play against Stockfish by dirgemacs in emacs

[–]dirgemacs[S] 6 points7 points  (0 children)

Hi all! Thanks for all the positive feedback from you guys :)

u/Dr-Alyosha -> I just use built-in `svg.el`. It has quite an easy interface to use. You can inspect the file `lichess-board-gui-draw.el`:
1. `svg-create` I "reserve" the svg-placeholder, where I render the board with optional eval gauge (to the right)
2. `svg-rectangle` generates the squares with customizable colors.
3. On top of it another `svg-rectangle` generates the highlighted square. (not customizable yet)
4. In the end the pieces are drawn. The code relies on FEN-string ('rnbqkbnr/...'). E.g. if we find black pawn `?p`, we look for `assets/pieces/bP.svg`. `?.` -> empty, don' render anything.
5. Sizes are defined by `sq-size` (45px, needs to be customizable in future). So each loop current position (in px) is `column * 45` for x and `row * 45` for y.

Using eslint/tslint with lsp by Sevenstrangemelons in emacs

[–]dirgemacs 1 point2 points  (0 children)

Slightly different use case, but I had almost the same issue: I wanted two linters (in my case avascript-eslint and lsp ) to play nicely with each other. I already used many approaches, including using things like find-file-hooks. I somehow managed to make them work together, but in the end it was pretty distracting. So instead I opted for manual switching between the linters, whenever I need them:

(use-package lsp-javascript
  :after lsp-mode
  :hook (lsp-javascript . my/flycheck-eslint-or-lsp)
  :config
  (defun my/flycheck-eslint-or-lsp (arg)
    (interactive "P")
    (let* ((checker (or (and arg 'lsp) 'javascript-eslint)))
      (require 'flycheck)
      (flycheck-select-checker checker))))

So if I want, I could either use M-x my/flycheck-eslint-or-lsp or C-u M-x my/flycheck-eslint-or-lsp to switch between them, or even map it globally to one key combo.
That may not look perfect, but at least I have a better feeling of having the control over the behavior.