jmacdonald / amp

A complete text editor for your terminal.
https://amp.rs
Other
3.68k stars 105 forks source link

Unable to load terraform syntax file? #122

Closed webframp closed 5 years ago

webframp commented 5 years ago

Hey, great project here! The speed, jump commands and fuzzy finder are excellent.

I tried using this syntax according to the wiki instructions but must be missing something:

image

I am using this file also with https://github.com/sharkdp/bat to add syntax support for tf files, which works, but I'm not sure what I'm missing or what's different for amp. It also uses syntect as described here: https://github.com/sharkdp/bat#adding-new-syntaxes--language-definitions

any ideas?

jmacdonald commented 5 years ago

Hi @webframp! Thanks, I'm glad you're digging amp so far. :smile:

Hmm, I'm getting the same issue locally. Let me debug this and see if I can find the root cause; I'll post an update shortly.

jmacdonald commented 5 years ago

I was able to isolate this to files opened as an argument when first running amp; it didn't occur when opening files using the fuzzy finder.

Syntax definitions are associated when a buffer is opened, and unfortunately, I was loading user-configured definitions after opening files specified as arguments. This has been fixed in master; can you build from source and let me know if this settles it for you? If not, feel free to reopen this issue. :slightly_smiling_face:

webframp commented 5 years ago

Tested current master, looks like 4a05180a5ec5ae2d8bd17d8f09f2a3648701e700 fixed it. Thanks @jmacdonald !

jmacdonald commented 5 years ago

Glad to hear it, @webframp; thanks for filing this!