Consider marking pragmas as something other than comments

Aperta
#1,766 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
emacs, haskell

Direzione di ricerca

Inizia esaminando come haskell-mode tokenizza il codice sorgente Haskell e come i completamenti basati su lsp-mode interpretano i commenti. Determina se i pragmi possono essere classificati separatamente senza conseguenze indesiderate, quindi usa la discussione dell’issue per stabilire il comportamento previsto e se è richiesta una modifica.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The root of this issue is that for lsp-mode-based completions, we would like to complete language pragmas. Since lsp-mode is quite generic, we don't have a good way of saying this, and we just have to say that we want completion in all comments. That is often quite annoying (https://github.com/emacs-lsp/lsp-haskell/issues/135).

@alanz made the suggestion that we could consider not treating pragmas as comments. I think that would mean a change to how haskell-mode tokenizes Haskell source, and ultimately I don't have a good sense of whether it would have lots of unintended consequences. But there is a certain logic to it: unlike normal comments, pragmas are active program elements that have a prescribed structure, and so in that sense are perhaps more like real syntax than comments.

As I said, I don't really know if this is a good idea or not, so I'd appreciate some wisdom!

Lingua principale
Emacs Lisp
Stelle
1.4k
Fork
357
Merge medio
7h 50m
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di haskell/haskell-mode

Tutte le issue di haskell/haskell-mode

Issue simili

Altre issue su DevTools

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.