A modern Language Server Protocol (LSP) implementation for Visual FoxPro, bringing contemporary IDE features to VFP development.
- 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
- 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.
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:
- Make it executable (Linux/macOS):
chmod +x vfp-lsp-* - Add to your PATH or configure editor to use the full path
- Rust 1.70 or later
- Node.js 18+ (for VS Code extension)
cargo build --releaseThe binary will be at target/release/vfp-lsp.
cargo test- Build the LSP server (see above)
- Add
vfp-lspto your PATH, or configure the path in settings - Install the extension:
cd editors/vscode npm install vsce package - Press F5 to launch a new VS Code window with the extension loaded
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,
}
}{
"vfp.server.path": "/path/to/vfp-lsp",
"vfp.trace.server": "verbose" // for better debugging
}require("vfp-lsp").setup({
cmd = "/path/to/vfp-lsp",
on_attach = function(client, bufnr)
-- Your keymaps here
end,
})MIT