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.

I think this server has potential 😃 I’m posting a list of things that can be improved about the completions, and I hope we can reach some agreement on this.

some_function(arg1, arg2)
-------------
 filterText

-------------------------
         label


insertTextFormat: always put 2 (snippet) for function, 1 (plaintext) for anything else

if the editor can do signatureHelp:
	insertText: some_function($0)
else:
	insertText: some_function(${1:arg1}, ${2:arg2})

I’m noticing there are a lot of keys that point to falsy values. If the value is falsy, make sure the key isn’t present at all. This makes the response payloads much smaller.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rwolscommented, May 21, 2020

Apologies for the silence.

These are just recommendations for getting completions to work nicely across editors.

  • Add filterText: it should be a substring of label, preferably only alphanumeric characters. For instance, for a function called foobar, the filterText would be… foobar. The label would be foobar(arg1, arg2).
  • Add insertTextFormat field: put 1 as the value if it’s a non-snippet, otherwise put 2 if it’s a snippet.
  • Enhance insertText: If the completion is a function, let’s call that function foobar, then set insertText as foobar($0) if the editor supports signatureHelp, otherwise set insertText as foobar(${1:arg1}, ${2:arg2}) if the editor doesn’t support signatureHelp.
0reactions
pappasamcommented, May 30, 2020

Ok, based on my own personal testing, this issue is resolved. Please feel free to open a new issue if you notice anything unsavory about the new snippets feature!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Completions - definition of completions by The Free Dictionary
1. the act of completing. ; 2. the state of being completed. ; 3. conclusion; fulfillment. ; 4. (in football) a forward pass...
Read more >
Completion Definition & Meaning - Merriam-Webster
The meaning of COMPLETION is the act or process of completing. How to use completion in a sentence.
Read more >
Completion (oil and gas wells) - Wikipedia
Well completion is the process of making a well ready for production (or injection) after drilling operations. This principally involves preparing the ...
Read more >
COMPLETIONS
Shawn Alpay named his project Completions as an internal reminder to finish things. Alpay has served as a cellist with many projects, including...
Read more >
Openhole & Cased Hole Oil & Gas Wells - Completions - SLB
Schlumberger openhole and cased hole oil & gas well completions reduce costs and maximize recovery. Get to maximum production faster with minimal HSE ......
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