SynSharp plugin
Intro
Plugin for SynWrite text editor.
Intelligent auto-completion and find-id-declaration for C# lexer.
Based on OmniSharpServer.
Requires .NET Framework (one of latest versions, 3 or 4).
How to install
Latest SynWrite supports plugins auto-installing. Just open "SynSharp.rar" file in SynWrite,
you'll see plugin installation prompt. Confirm it, then wait until "unrar" window finishes its work.
How to use
Usage notes
- Before calling plugin, write full filename of your C# solution sln-file to the "Search paths" list.
I.e., write it in the SynWrite options dialog ("Path Environment" tab), or in the current SynWrite project properties dialog.
Second method is better, if you use several SynWrite projects with different solutions.
Note: not folder of sln-file, but full filename of sln-file.
- On first call plugin runs OmniSharp server window. This window is minimized, you can close it any time,
after work in editor is finished. Server runs slowly, some seconds, but works fast.
- If plugin fails, you should see short message about it, in SynWrite status bar.
- If plugin fails, then instead of intelligent completions list, you'll see fixed names list, from file "SynWrite\HL\C#.acp".
You may delete this "C#.acp" file if you don't need fixed list.
- Plugin fails if current server window was opened for another solution file.
Plugin cannot close server window by itself, so please close server window by yourself, if you see error message about wrong solution file.
Plugin stores last solution filename to file "history.ini" in the plugin folder.
Auto-completion
In C# source file, place caret after "objname." or "objname.Func" (ie, some class name followed with a dot and, maybe, partially typed name),
and press Ctrl+Space (default auto-completion shortcut). You should see message in SynWrite statusbar:
Trying auto-complete: .....
then, after server reply, you should see auto-completion list for your objname.
Find symbol definition
In C# source file, place caret on any function/variable/class name, and call command "Find ID" from SynWrite context menu.
(Menu item should be enabled if you have registered plugin in [FindID] section of SynPlugins.ini.)
After server reply, plugin will open file with id declaration and place caret before this id.
You can also click id with Ctrl+Alt pressed (instead of using menu).
Config file
You may create file "SynSharp.ini" in the plugin folder and write there few options in section [ini]:
- datadir: Specifies folder which contains "server" folder (default is plugin folder).
- server_port: Specifies TCP port for server (default is 2000).
- server_hide (bool: 0 or 1): Enables to hide server window (default is 0: window is minimized).
About
- License for SynSharp is Mozilla Public License 1.1
- OmniSharpServer © OmniSharpServer contributors
- SynSharp plugin © Alexey Torgashin, UVViewSoft