Milys / gpp-vscode

Syntax highlighter for SolidCam gpp language.
MIT License
0 stars 0 forks source link

[REQ] Work with Code Outline plugin #1

Closed BassLineHUN closed 6 years ago

BassLineHUN commented 6 years ago

Hello,

I am working with gpp posts for many years with UltraEdit, but now might be the time has changed with your syntax highlighter to change my editor to VS Code.

It would be great if your plugin work with Code Outliner - what is generating tree view. As I read it is possible if : "This extension will support any language as long as there is a language-specific extension that implements the SymbolProvider API for VS Code. "

How do you think? It would be possible? Regards,

Joe

Milys commented 6 years ago

Hi Joe,

I think this is good idea for Code Outliner. I use to navigate .gpp file with CodeMap Extension for VsCode. Here the instruction how to do that on Windows computer (On apple computer is the same).

1. First Install CodeMap extension. 2. Then Go directory and open file mapper_md.js in VsCode C:\Users\YourUserName.vscode\extensions\oleg-shilo.codemap-1.4.3\out\src 3. Save this file as in the same dir as 4. mapper_gpp.js 5. Next in mapper_gpp.js file change from

            if (line.startsWith("### "))
                members.push(`${line.substr(4)}|${line_num}|level3`);
            else if (line.startsWith("## "))
                members.push(`${line.substr(3)}|${line_num}|level2`);
            else if (line.startsWith("# "))
                members.push(`${line.substr(2)}|${line_num}|level1`);
            else if (line.startsWith("![image]"))
                members.push(`<image ${image_index++}>|${line_num}|none`);
  1. To

            if (line.startsWith("@ "))
                members.push(`${line.substr(0)}|${line_num}|level1`);
            else if (line.startsWith("call "))
                members.push(`${line.substr(0)}|${line_num}|level4`);
            else if (line.startsWith("![image]"))
                members.push(`<image ${image_index++}>|${line_num}|none`);
  2. And Save

Next open settings in VsCode:

  1. File - Preferences - Settings
  2. On Right side to User Settings add two lines

"codemap.gpp": "C:\Users\MLyszkiewicz\.vscode\extensions\oleg-shilo.codemap-1.4.3\out\src\mapper_gpp.js",

  1. Be sure you have comma on the end, and your extension revision.

Check my Attachment, you can jump to any proc. If you have question let me know.

Mitch


From: BassLineHUN notifications@github.com Sent: Tuesday, June 19, 2018 2:02 AM To: Milys/gpp-vscode Cc: Subscribed Subject: [Milys/gpp-vscode] [REQ] Work with Code Outline plugin (#1)

Hello,

I am working with gpp posts for many years with UltraEdit, but now might be the time has changed with your syntax highlighter to change my editor to VS Code.

It would be great if your plugin work with Code Outliner - what is generating tree view. As I read it is possible if : "This extension will support any language as long as there is a language-specific extension that implements the SymbolProvider API for VS Code. "

How do you think? It would be possible? Regards,

Joe

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/Milys/gpp-vscode/issues/1, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKuwGRgp4R5aNwGxxHhG0yPAWfARb2mnks5t-L4tgaJpZM4UtHQc.

BassLineHUN commented 6 years ago

Hello Mitch, Thank you for the detailed answer, it works for me ! Regards,

Joe