VS Code: Looking for an axtension to group other extensions by programming language - visual-studio-code

Okay, I know the title is not very clear, but is hard to describe what I need, so I'll try to describe it better:
I use a lot of programming languages due to my studies at the university, and my favorite editor is visual studio. The problem is, I don't want to overload it with a lot of active extensions at the same time. Therefore, the idea I came up with is an extension that creates "sessions" (or something like that) depending on what programming language I want to use. For example, imagine I want to use python, then I'd turn on an option which will enable the extensions needed for python and it will disable the remaining ones.
I can't find any similar extension on Google, I don't know if I am using the correct keywords for that, though. So, if you know of something that will help me, let me know please.

Related

Note taking extension on vscode that helps programming?

I'm new to programming, during learning I face problems like I don't fully understand some part of codes in a complex program, therefore I need to write down what I don't understand somewhere, and retrieve/review codes&my questions later. Therefore I'm looking for a vscode extension or software that can implement those functions:
comment on code
overview on my written comments(I want to go through everything I write down in one place)
jump to the location in codes where I write this comment
Any suggestions? Thanks!

VS Code formatting plugins

Is there a way in VS Code to format code according to the style that a person prefers? I guess there might be a plugin for this sort of thing but I've not found that.
For example, I prefer 'K&R' coding style while a colleague prefers 'Whitesmiths' style. When we share code or functions it would be nice to autoformat code into the style that each prefers.
This does not seem like it should be so difficult for a plugin to do except that coding style also has to parse the language of the code, so Whitesmiths PowerShell is going to be different from Whitesmiths on Perl I would imagine.
Are there any plugins like this (or internal functionality in VS Code - it's a very comprehensive tool without installing any plugins of course!) that people use regularly like this?
In contrast to its name, "JIndent" (commercial) is a tool I've been using for the exact purpose you're asking about.

Delete a specific Intellisense suggestion in VS Code

Intellisense sometimes comes up with irrelevant suggestions that I will never use in my project. Those can get in the way of the valuable other suggestions.
They also prevent VS Code features like "Add all missing imports" from working.
For example:
The first DocumentType is a low-level module that I will never use.
The second is one that I need in most of my files.
So how can I get rid of the first one?
Related (obsolete and unanswered) questions:
VS Code intellisense remove some suggestions
Disable specific autocomplete suggestion in Visual Studio 2013
You cannot disable specific IntelliSense completion options, however, there are a few other relevant caveats.
Answer to not your question: You can filter whole classes of keywords with the editor setting editor.suggest.filteredTypes. See more about this here.
IntelliSense does not allow you to configure or filter specific keywords. The list of all IntelliSense options is here. It also appears this is impossible with other major options. For example, the language server protocol does not support this(GitHub thread abt this). That being said, there is a plethora of autocomplete extensions and I'm certain this feature exists for some.
Something like intellicode might also be an answer, as it will look through other files you've edited to try to learn your practices.
If you're 100% sold on IntelliSense, and you're willing to sink several hours into this, you could set up a discrete language server, and then use something like this to filter completions as they are sent to the editor. While this would work, I think it's a terrible idea.
After spending several hours with no satisfying result, I created my own IntelliSense snippets. I used another keyword to make sure, it will show on top.
I used the Easy Snippet plugin for this.

Creating a plugin for code hinting

I'm working with an internally-developed scripting language that some prof and his team have created for an academic project. There's documentation that show function signatures of the existing classes, but for outsiders like me, I'm constantly referring to documentation. Also, in the summer, more helpers will join and I bet they will all suffer from the same problem. So I'd like to write something in Eclipse to help with code hinting and completion, like many languages have.
I haven't programmed eclipse add-ons before, so can someone give me hints how I would generally take the function signatures from their documentation and get code hinting from it. I realize I may need to make changes to the documentation to use it for what I need. But any hints or sample projects would be appreciated. I'm not sure how to get started.
You should have a look at Xtext. With Xtext you can define a domain specific language and generate an editor for it. Here you can find a brief tutorial.

Getting Started with an IDE?

Having programmed through emacs and vi for years and years at this point, I have heard that using an IDE is a very good way of becoming more efficient.
To that end, I have decided to try using Eclipse for a lot of coding and seeing how I get on.
Are there any suggestions for easing the transition over to an IDE. Obviously, some will think none of this is worth the bother, but I think with Eclipse allowing emacs-style key bindings and having code completion and in-built debugging, I reckon it is well worth trying to move over to a more feature-rich environment for the bulk of my development worth.
So what suggestions do you have for easing the transition?
Eclipse is the best IDE I've used, even considering its quite large footprint and sluggishness on slow computers (like my work machine... Pentium III!).
Rather than trying to 'ease the transition', I think it's better to jump right in and let yourself be overwhelmed by the bells and whistles and truly useful refactorings etc.
Here are some of the most useful things I would consciously use as soon as possible:
ctrl-shift-t finds and opens a class via incremental search on the name
ctrl-shift-o automatically generates import statements (and deletes redundant ones)
F3 on an identifier to jump to its definition, and alt-left/right like in web browsers to go back/forward in navigation history
The "Quick fix" tool, which has a large amount of context-sensitive refactorings and such. Some examples:
String messageXml = in.read();
Message response = messageParser.parse(messageXml);
return response;
If you put the text cursor on the argument to parse(...) and press ctrl+1, Eclipse will suggest "Inline local variable". If you do that, then repeat with the cursor over the return variable 'response', the end result will be:
return messageParser.parse(in.read());
There are many, many little rules like this which the quick fix tool will suggest and apply to help refactor your code (including the exact opposite, "extract to local variable/field/constant", which can be invaluable).
You can write code that calls a method you haven't written yet - going to the line which now displays an error and using quick fix will offer to create a method matching the parameters inferred from your usage. Similarly so for variables.
All these small refactorings and shortcuts save a lot of time and are much more quickly picked up than you'd expect. Whenever you're about to rearrange code, experiment with quick fix to see if it suggests something useful.
There's also a nice bag of tricks directly available in the menus, like generating getters/setters, extracting interfaces and the like. Jump in and try everything out!
One thing that helped me transition from Emacs to other IDEs was the idea that IDEs are terrible editors. I scoffed at that person but I now see their point.
An editor, like Emacs or Vim, can really focus on being a good editor first and foremost.
An IDE, like Visual Studio or Eclipse, really focuses on being a good project management tool with a built in way to modify files.
I find that keeping the above in mind (and keeping Emacs handy) helps me to not get frustrated when the IDE du jour is not meeting my needs.
If you've been using emacs/vi for years (although you listed both, so it seems like you may not be adapted fully to one of them), using said editor will probably be faster for you than an IDE. The level of mind-meld a competant emacs/vi user can achieve with a customized setup and years of muscle memory is astounding.
Some free ones:
XCode on the Mac
Eclipse
Lazarus (Open Source clone of Delphi)
Visual Studio Express
Editions
Try making a couple of test applications just to get your feet wet. At first, it will probably feel more cumbersome. The benefits of IDEs don't come until you begin having a good understanding of them and their various capabilities. Once you know where everything is and start to understand the key commands, life gets easier, MUCH easier.
I think you'll find IDE's invaluable once you get into them. The code complete and navigation features, integrated running/debugging, and all the other little benefits really add up.
Some suggestions for starting out and easing transition:
- start by going through a tutorial or demonstration included with the IDE documentation to get familar with where things are in the GUI.
- look at different kinds of sample projects (usually included with the IDE or as a separate download) for different types of areas you may be coding (web applications, desktop applications, etc) to see how they are laid out and structured in the IDE.
- once comfortable, create your own project from existing code that you know well, ideally not something overly complex, and get it all compiling/working.
- explore the power! Debug your code, use refactorings, etc. The right click menu is your friend until you learn the keyboard shortcuts just to see all the things you can do. Right click different areas of your code to see what is possible and learn (or re-map) the keyboard shortcuts.
Read the doc...
And see what shortcuts/keybindings equivalents are with your familiar ones. Learn the new ones...
Old question, but let me suggest that in some circumstances, something like Notepad++ might be appropriate for the OP's situation which may be encountered by others. Especially if you are looking for something lightweight, Notepad++ can be part of a developer's arsenal of tools. Eclipse, Visual Studio and others are resource hogs with all their automagic going on and if you are looking to whip out something pretty quick with a whole bunch of keyboard shortcuts and the like or if you are interested in viewing someone else's source, this can be quite useful. Oh yeah, and it is free too.