newdatasystems / vscode-foxpro

VSCode Extension for the Microsoft Visual Foxpro programming language
MIT License
20 stars 5 forks source link

Outline Class, Functions and Procedures #5

Open agilsantos opened 5 years ago

agilsantos commented 5 years ago

This is more of a sugestion/improvement.

Use Outline to list file Class and Method as well as Other Functions and Procedures on the File.

newdatasystems commented 5 years ago

I'm not sure what you mean by "Use Outline"? The Code Outline extension that comes up in search has been unpublished.

I suspect you can achieve similar results using the CodeMap Explorer extension with the following to your settings.json:

"codemap.prg": [
        {
            "pattern": "^\\s*(defi|define|DEFI|DEFINE) (class|CLASS) \\w*",
            "icon": "level3",
            "clear": "DEFINE|DEFI|define|defi"
        },
        {
            "pattern": "^\\s*(prot |protected |PROT |PROTECTED )?(func|function|FUNC|FUNCTION|proc|procedure|PROC|PROCEDURE) \\w*",
            "icon": "function",
            "clear": "function|func|FUNCTION|FUNC|procedure|proc|PROCEDURE|PROC"
        }
    ],
Khaos66 commented 3 years ago

To fill the Outline View of VSCode you need to add some of the Language Services: https://code.visualstudio.com/api/language-extensions/programmatic-language-features I guess it would be: DocumentSymbolProvider