Intellisense for Python keywords in Robot Framework not working in VS Code - visual-studio-code

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.

Related

VSCode Intellisense selecting the wrong libraries for PlatformIO code

I'm using VSCode with the PlatformIO plugin and PlatformIO bazel integration (https://github.com/mum4k/platformio_rules) to write code for multiple different types of micro controllers (ATTiny84, ATTiny85, Arduino Nano, ESP32-S3). The code builds correctly as the bazel integration to PlatformIO selects the correct libraries, but as there are libraries with the same name made for different types of micro-controllers, IntelliSense will select one kind of at random and will mark a bunch of symbols as not defined or libraries not found (effectively, a lot of red squiggly marks)
As an example, I have some code that configures a timer for ATTiny85, and access registers like TCCR1 and OCR1A, which are correctly defined in Arduino.h for that micro-controller, but are not defined in any of the other 4 versions of the library available
Another example would be Arduino.h not defining Serial when built on ATTiny, but doing it when working with the Arduino Nano
The code I'm working on here is C++
Because of the fact that the whole project includes code for all of those micro-controllers (the project makes use of several different types of micros) I need to put the directories where all of those libraries are in for all of the micros in the include path, which is what I think is causing this problem. I have tried to fully qualify the path for the library that I'm using in my code, but that doesn't work because libraries included inside those libraries are not (and cannot be) fully qualified, so at some point this problem happens again, just one level of indirection down. Also, this code might end up being open source at some point, hence I cannot force my own absolute paths there
I would like either
For VSCode IntelliSense to get information about the right libraries to include through either PlatformIO or Bazel (best solution)
If that doesn't work, I'd like to have the option to change the include path on a per-directory basis. This would add additional directory structure on my project, and I'm still not 100% sure it would work, but would be a start
At this point I feel like my only option is to disable the red squiggly lines completely, but that looks like a sub-optimal solution

VS Code / IDEs: How can I enable cmd+click goto definition for variables declared at runtime?

I'm looking to improve my own productivity by trying to figure out how to provide cmd+click functionality for variables declared at runtime. I work with a library that allows you to register objects to it at runtime to be accessed later — it would be great if I could cmd+click to definitions of these! How do you think I could achieve this? I'm open to any ideas. Thanks!
Edit:
Thoughts I have so far inspired by feedback from various Slack communities:
There is no such thing as 'runtime' when providing functionality in IDEs
We need to be able to teach the IDE about what definitions to expect. Whether this means writing an extension to use the VS Code API specifically for my use-case, or otherwise working within a system that generates files that the IDE already knows to look for, which allows it to connect the dots and provide the precious peek / goto definition functionality
Edit:
I'm starting work on a VS Code extension that reads a dotfile for configuration — I'll share what I find out as I go!

Goto definition like feature in custom (user-defined) language in notepad++

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.

automatic code generation for IDL (ITTVIS/exelis) in eclipse IDE?

I was hoping to find a way to automatically generate some code based on existing code.
The actual functionality would be very similar to javadoc or in this case IDLdoc or to automatic get/set functions.
I want to create some generic code based on some already listed parameters.
How do I accomplish this within eclipse?
I think an example would be best, so here is what I would like to accomplish:
keyword1: stuffIdontCareAbout, $;comments
keyword2: otherStuffIdontCareAbout, $;more comments
keyword3: lastStuffIdontCareAbout $
What do I need to do in eclipse so that I can have eclipse quickly parse the above block and output the following for another part of the code?
KEYWORD1=inp_keyword1, KEYWORD2=inp_keyword2, KEYWORD3=inp_keyword3
Thanks
My usual knee-jerk response is to suggest that you use JET as that what it's designed for.
For this specific case, however, you might be better off just writing a simple popup action (use the new plugin project with the popup action template) that parses the properties file (looks simple enough to do in Java) and writes out the target code to another file, the console or, if you're clever, back into an existing file in the right place.
Once you have the plugin generated for you with the template, the rest should be simple Java.

Is there any text editor for Mac that can be configured to have, or already has, autocomplete for Lua?

I know TextWrangler shows the option, but it doesn't actually do anything. So what I want is autocomplete, either with a key combination, or while I type.
Syntax coloring/highlighting is a requirement as well, though I know Xcode and TextWrangler have that.
You might want to use Lua Development Tools for this purpose. It has syntax coloring, plus it is doing smart autocomplete, depending on what your actual context is (required modules, ...)
It is an Eclipse Technology project, and it is Open Source! (EPL license).
Project web page - http://www.eclipse.org/koneki/ldt
Installation via Eclipse Marketplace - http://marketplace.eclipse.org/content/lua-development-tools-koneki
I don't know if you have seen this page, but it seems a good place to start:
http://lua-users.org/wiki/LuaEditorSupport
If I search for "completion" I get:
Decoda (Win)
LuaEdit (Win)
DForD (Win)
NsEditor (Win)
Visual Studio + LuaLite
Eclipse + LuaEclipse or LunarEclipse (java)
I personally use Vim + SuperTab (which only auto-fills with things that you have previously written).
There's a nice plugin for IntelliJ IDEA for Lua. IntelliJ IDEA is really nice, though kind of biggish.
Aside of that there is also TextAdept which is a lot smaller, and 100% configurable in Lua.
And probably a bunch of others.
If you want full (semantic) autocompletion, you should try lua-inspect (source code), which can be installed in the SciTE editor, and also into ViM using vim-lua-inspect.
It uses Metalua to fully parse the source code into AST and then performs code analysis. Apart from simple keyword-based syntax highlighters, it can:
differentiate between local/global variables, parameters and unused variables
jump to the definition of a variable/function
autocomplete table members
correctly rename variables/functions (not only definitions but also uses)
Even though it is not yet stable, and tends to hang on large scripts, it is very usable for standard Lua programs, mainly for it's intelligent autocompletion and renaming.