japhib/pico8-ls

Support built in globals

Lexicality opened this issue · 4 comments

All the uppercase symbols (eg 🅾️) are constants, but the language server says they're undefined.
Examples from demos/api.p8:

	if (btn(❎)) then
	 camera(cos(t()/6)*20,0)
	 clip(4,16,120,96)--x,y,w,h
	end
	fillp(░)
	circfill(64,160,52,7)
	fillp() -- reset

Fixed with 0.4.0. I added all the uppercase symbols, e.g. everything you get when typing Shift + an alphabet letter. Let me know if I missed any.

How do you actually enter these characters? Typing Shift-L in Pico-8 gives the ⬅️ glyph, but in VSCode, it just give me an "L". I've been entering these glyphs in Pico-8, and then switching back to VSCode, but if there's a way to actually type them in VSCode, I'd love to know it.

How do you actually enter these characters? Typing Shift-L in Pico-8 gives the ⬅️ glyph, but in VSCode, it just give me an "L". I've been entering these glyphs in Pico-8, and then switching back to VSCode, but if there's a way to actually type them in VSCode, I'd love to know it.

When I opened the issue I was trying to edit a pre-existing script, but you should be able to add all the symbols from your OS's emoji picker, eg

  • win+;
  • cmd+ctrl+space
  • ctrl++

Oh, for Pete's sake... I didn't even think about entering them that way. 🤦🏻‍♂️ Thank you!