Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

Repository files navigation

VFP-LSP

Is getting archive because my company pull the plug on it. I might come back at some point...

Release License: MIT

A modern Language Server Protocol (LSP) implementation for Visual FoxPro, bringing contemporary IDE features to VFP development.

Features

  • Syntax Highlighting - Full syntax highlighting for VFP code
  • Diagnostics - Real-time error detection for syntax issues
  • Completion - Keyword, function, and identifier completion
  • Go to Definition - Navigate to function/procedure definitions
  • Find References - Find all usages of a symbol
  • Hover - Documentation on hover for keywords and built-in functions
  • Document Symbols - Outline of functions, procedures, and classes
  • Semantic Tokens - Enhanced syntax highlighting via LSP

Supported VFP Features

  • Preprocessor directives (#DEFINE, #IF, #INCLUDE, etc.)
  • Embedded SQL (SELECT, INSERT, UPDATE, DELETE)
  • Classes and inheritance
  • Exception handling (TRY/CATCH/FINALLY)
  • All control flow constructs
  • Date/DateTime literals
  • All VFP operators including .AND., .OR., .NOT.

Installation

Pre-built Binaries

Download the latest release for your platform from GitHub Releases:

  • Linux (x64): vfp-lsp-linux-x64
  • Linux (ARM64): vfp-lsp-linux-arm64
  • macOS (x64): vfp-lsp-macos-x64
  • macOS (ARM64): vfp-lsp-macos-arm64
  • Windows (x64): vfp-lsp-windows-x64.exe

After downloading:

  1. Make it executable (Linux/macOS): chmod +x vfp-lsp-*
  2. Add to your PATH or configure editor to use the full path

Building from Source

Prerequisites

  • Rust 1.70 or later
  • Node.js 18+ (for VS Code extension)

Build the LSP Server

cargo build --release

The binary will be at target/release/vfp-lsp.

Run Tests

cargo test

Editor Setup

VS Code

  1. Build the LSP server (see above)
  2. Add vfp-lsp to your PATH, or configure the path in settings
  3. Install the extension:
    cd editors/vscode
    npm install
    vsce package
  4. Press F5 to launch a new VS Code window with the extension loaded

Neovim

See editors/neovim/README.md for detailed instructions.

Quick setup with lazy.nvim:

return {
    {
        "franpfeiffer/vfp-lsp",
        ft = { "vfp", "foxpro" },
        config = function()
            require("vfp-lsp").setup()
        end,
    }
}

Configuration

VS Code Settings

{
  "vfp.server.path": "/path/to/vfp-lsp",
  "vfp.trace.server": "verbose" // for better debugging
}

Neovim Configuration

require("vfp-lsp").setup({
  cmd = "/path/to/vfp-lsp",
  on_attach = function(client, bufnr)
    -- Your keymaps here
  end,
})

License

MIT

About

An LSP for Visual Fox Pro

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages