question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Migrate extension_lang_map to a global Talon list

See original GitHub issue

I think we should migrate the variable extension_lang_map to a Talon list.

Ideally, someone implementing support for a new programming language would not have to modify any existing code, and each language mode would append the programming language name and its file extensions to the global list, which would trigger the creation of a new language mode. I assume that this requires registering an event handler in code.py, rather than the current loop which creates language modes once based on a constant mapping.

In the current setup, the mapping is not exposed, which leads to developers copying it into their own project whenever they need to know about language modes and file extensions. For instance, see talon_hud. Such copies naturally get out of sync with the copy in this repository. Furthermore, someone implementing support for a new language must also know to update the list in talon_hud/status_bar_poller.py and any other project which uses this mapping.

If approved, I should be able to make this change with minimal guidance, and I would be happy to also update chaosparrot/talon_hud.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
wenkokkecommented, Jan 4, 2022

I’ve been using it in my personal set up, and it works just fine.

1reaction
wenkokkecommented, Nov 17, 2021

@rntz I don’t think we take a global variable defined in one module and mutate it in another.

It’s bad practice in general, but, e.g., matplotlib does it.

@rntz I’m not confident it’ll always play nice with Talon’s auto-reloading.

Yeah, I understand that concern. However, we might be able to let code.py expose an action which binds in a new language mode?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrating to V2 - Talon.One docs
Generally, the migration consists in: Updating all request URIs to use the V2 URI. Update the parameters and request bodies.
Read more >
SPMT supported SharePoint List Templates - Microsoft Learn
List template ID Name Supported by SPMT ‑1 InvalidType No 0 NoListTemplate No 100 GenericList Yes
Read more >
Migration and Transfer - Overview of Amazon Web Services
AWS Application Discovery Service helps enterprise customers plan migration projects by gathering information about their on-premises data centers.
Read more >
Talon FAST 4.5 User Guide - System Center Wiki
The Global Exclusion List feature allows SMB/CIFS file server shares to be hidden from all FAST™ Edge servers, and subsequently from branch office...
Read more >
Global compact for migration | Refugees and Migrants
Warning message. The service having id "printmail" is missing, reactivate its module or save again the list of services. Global compact for migration....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found