For visual studio code, there exists some addon/plugin which shows you the origin for example of an included class, the return value of a function etc..
I find it very handy, but I want this functionality in atom since I prefer atom.
How does one call this kind of plugin/addon, so I can look for it on google?
And ideally, what addon/plugin supports this feature best.
If I understood you correctly, the functionality name is IntelliSense.
About IntelliSense used in VS code, you can read here.
Actually you must do your research depending on programming language you use. I.e. if you're using js you must search javascript Intellisense atom and find it in first link
Related
Is it possible to write an extension which will do code analysis? I looked at the api and I didnt see how I can get all variables that are declared in the document/xref on specific variable and get it flow in the code. If someone know api in visual studio code which actually helps with it, it will be great.
Creating such an extension is certainly possible, however you have to do your own language processing. AFAIK there's no way to access the internal structures (syntax tree, symbol table etc.) of the existing JS/TS (or other language for that matter) extensions.
I did my best to overcome this problem but it was in vain. I am developing tests in Robot Framework (RF) in Visual Studio Code and I want it to either show "signatures" of keywords from standard libraries or to be able to go to their definitions. Go to definition and signature displaying when hovering with Ctrl key are behaving this way:
works for my keywords written in RF (hoorah!)
works for my keywords written in Python only if a keyword consists of one word (I think conversion between undescores and spaces is failing)
does not work for keywords from standard libraries even if the keyword is one-word (e.g. "Fail"), regardless whether the keyword comes from built-in libraries or other ones (e.g. SeleniumLibrary)
When failing, Robot Framework Intellisense Server gives me message "Keyword definition 'Blah Blah' not found from the workspace".
I am using plugins Robot Framework Intellisense FORK and/or Robot Framework Language Server. I tried to configure them carefully according their documentation (Details), but the best state I reached is described above.
Can you help me please? I do not need to use a specific plugin, I just need to have the signature or documentation (or implementation) of every keyword in my code to be one click far.
According to their documentation they support
Goto definition
For variables
For user keywords
I was able to partially solve this when I not only open the folder with source code, but create a workspace and add the folder containing standard libraries to it as well (Add Folder to Workspace). I do not know exactly which folder is the best to add, it seems ...\Python\Python37\Lib\site-packages\ to me.
Hi i am creating my first extension for VSCode following the official tutorial
After running the command yo code to create a boilerplate the program asks which type of extension to create.
I couldn't find any docs for these types of extensions that would help me determine how they differ from each other except for
Language Extensions.
It would be helpful if there were some documentation explaining these.
From top to bottom:
An extension that adds any of the possible contribution points (theme, keybindings, language support, icons, snippets etc.). Initial language is Typescript, but you can use other languages at any time, as long as they can be transpiled to Javascript.
Like 1), but with JS as initial language. Still, you can use other languages too.
A color theme for syntax highlighting, which is a collection of colors for predefined token types (these types are determined by a language extension, either provided by another extension or yours).
Language support, which means handling of a programming or markup language. That includes parsing of such code and providing the tokens for syntax highlighting, code completion, code lenses, parameter info, formatting, linting etc. This could include a language server (which is just a separate process for all that mentioned here), but that has an own entry in this list.
Code snippets, to provide small code parts for use during programming.
Keymap, to provide specific keybindings (e.g. vim is a very popular keybinding).
Extension pack, not 100% sure about that, but I believe this packs multiple extensions into one (e.g. if you have separate keybindings and color theme extensions, you can pack them into a combine extension).
The previously mentioned language server. Language processing can be time consuming and you don't want to block the main (UI) thread. So, any such processing can be moved out to a language server, which can even be written in faster languages like C++ for highest performance.
Given this list it should be clear that you either want 1), 2) or 4).
From my extension, how can I access the abstract syntax tree that VS Code has for the active file? I have been looking through the API docs but haven't been able to find anything. I also came across this SO question but both the question and answer are pretty opaque to me.
There's no thing like a common AST for files loaded into an editor. In fact, many file aren't even parsed at all, unless an extension is installed which does that.
The linked answer describes a way to implement language support (via a language server), which is not the same as getting a fictional AST from vscode.
Is there any way (by means of plugins or settings) to create (by that I mean modifying, adding & deleting) custom tags in notepad++?
By tags I mean, to jump to the definition of an instance used anywhere in project (some kind of like 'goto definition' function like we have in other popular languages like C, C++, C#).
I searched for this topic but could not find satisfactory result.
My requirement:
I have created a custom language in Notepad++ (by adding keywords, coloring patterns and other rules). Now I need the way to add custom tags for this language. How can I achieve this?
With the help of tags I should be able to navigate to definition (just like goto definition in other popular languages) in the particular project (all files in project or at least opened files).
Now I need the way to add custom tags for this language. How can I achieve this?
If you're using Exuberant Ctags you can configure a new language definition using just a handful of regular expressions.
For example this link shows how to configure ctags for the Clipper language using this regexp approach:
I have just had to deal with essentially the same issue. I am using Notepad++ with a legacy codebase written in a custom markup language. Each file can contain cross references to definitions in other files, so a way of jumping to the definition would be very useful.
It has not been easy to find a solution that meets all four requirements: a goto definiton feature that works across multiple files and for a custom language in Notepad++. I found this question while searching for a solution; the answer jussij provided is good but it does not really provide a complete solution.
I ended up using the SourceCookifier plugin with a custom language definition. There is not a huge amount of guidance online about how to use it, but once installed you can use it to manually create a language definition using regex rules.
SourceCookifier will work for your language if you can configure the following:
A set of file extensions used by the language
A set of tag types (i.e. a function, class, variable)
A set of POSIX Basic Regular Expressions for locating each tag type, see this post
Once a language has been defined, you can highlight any instance of a found tag and use the shortcut Ctrl+Shift+Enter to jump to the definition of that tag. This can work across a whole codebase of files if you provide it with a list of files to inspect, it calls this a 'session'. All you need to do is drag and drop your codebase folder into the SourceCookifier sidebar window. The codebase I was working with is very large, so I am only using basic functionality, see this post for a good explination of that. The goto definition shortcut can also be added to a right-click context menu, see this post.