Eph97 / stata-language-server

stata language serve based on pygls, including auto completion, codestyle checking, etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stata-Language-Server

Write your Stata scripts more fluently!

Actions Status

Description

An extension for Stata on VS Code. It provides codestyle checking, goto-definition, syntax tips and auto completion.

Developed based on language server, depending on Third-party Python library pygls.

Note: Python(>=3.6) is required on local system before extension installing. Another extension Stata Enhanced is recommanded for syntax highlight since Stata Language Server doesn't provide this feature.

Supported Features

  • Codestyle Checking

    When editing a stata do-file, the extension will check documents and show bad codestyle using wavy underlines.

    diagnostic

  • Syntax tips while hovering

    When hovering on a complete command, a markdown formatted Syntax Description will appear.

    Note: Not available for 1.abbr. commands(eg: g, gen); 2.docstring included in another command's docstring(eg: replace belongs to generate)

    hover

    Note: Docstring files of this extension are only for academic purpose. The original work copyright belongs to StataCorp LLC. See ThirdPartyNotices.txt for details.

  • Goto Definition(generate varname =)

    Find and jump to the last generate place when right-click a variable name and click Go to Definition. Can match pattern like g(enerate).

    gotoDefinition

  • Syntax auto completion

    Auto-Completion for most stata commands. Only support complete syntax(eg: generate, not g(enerate)).

    completion

Requirements

  • Python >= 3.6

Note: The extension takes the value(default python) of python.pythonPath in VSCode's Settings as the running version. You may check that terminal command python are correctly linked to v3.6 or later, or change the path to a full path in VSCode.

Settings

Setting Name Description Default Value
stataServer.setMaxLineLength Max line length for codestyle checking 120
stataServer.setIndentSpace Indent spaces for codetyle checking 4
stataServer.enableCompletion Turn on/off auto-completion true
stataServer.enableDocstring Turn on/off docstring tips true
stataServer.enableStyleChecking Turn on/off codestyle checking true

Release Notes

Refer to CHANGELOG.md

Issues

Submit issues if you find any bug or have any suggestion.

About

stata language serve based on pygls, including auto completion, codestyle checking, etc.

License:MIT License


Languages

Language:Python 75.7%Language:TypeScript 23.6%Language:Stata 0.7%