diff options
| author | Dhia <dhiadah@gmail.com> | 2021-09-08 17:24:36 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-08 09:24:36 -0700 |
| commit | 61e9d9bb3eb85f3fe184905b24863d9b444a3168 (patch) | |
| tree | f6f4fdf2e53ff1a587912c9d62707d23e53e9293 /lua/lspconfig/pasls.lua | |
| parent | [docgen] Update CONFIG.md (diff) | |
| download | nvim-lspconfig-61e9d9bb3eb85f3fe184905b24863d9b444a3168.tar nvim-lspconfig-61e9d9bb3eb85f3fe184905b24863d9b444a3168.tar.gz nvim-lspconfig-61e9d9bb3eb85f3fe184905b24863d9b444a3168.tar.bz2 nvim-lspconfig-61e9d9bb3eb85f3fe184905b24863d9b444a3168.tar.lz nvim-lspconfig-61e9d9bb3eb85f3fe184905b24863d9b444a3168.tar.xz nvim-lspconfig-61e9d9bb3eb85f3fe184905b24863d9b444a3168.tar.zst nvim-lspconfig-61e9d9bb3eb85f3fe184905b24863d9b444a3168.zip | |
feat: add pascal language server (#1087)
Diffstat (limited to 'lua/lspconfig/pasls.lua')
| -rw-r--r-- | lua/lspconfig/pasls.lua | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/lua/lspconfig/pasls.lua b/lua/lspconfig/pasls.lua new file mode 100644 index 00000000..61003d1b --- /dev/null +++ b/lua/lspconfig/pasls.lua @@ -0,0 +1,41 @@ +local configs = require 'lspconfig/configs' +local util = require 'lspconfig/util' + +configs.pasls = { + default_config = { + cmd = { 'pasls' }, + filetypes = { 'pascal' }, + root_dir = function(fname) + return util.find_git_ancestor(fname) or util.path.dirname(fname) + end, + }, + docs = { + description = [[ +https://github.com/genericptr/pascal-language-server + +An LSP server implementation for Pascal variants that are supported by Free Pascal, including Object Pascal. It uses CodeTools from Lazarus as backend. + +First set `cmd` to the Pascal lsp binary. + +Customization options are passed to pasls as environment variables for example in your `.bashrc`: + ```bash +export FPCDIR='/usr/lib/fpc/src', +export PP='/usr/lib/fpc/3.2.2/ppcx64', +export LAZARUSDIR='/usr/lib/lazarus', +export FPCTARGET='', +export FPCTARGETCPU='x86_64', + + ``` + +`FPCDIR` : FPC source directory (This is the only required option for the server to work). + +`PP` : Path to the Free Pascal compiler executable. + +`LAZARUSDIR` : Path to the Lazarus sources. + +`FPCTARGET` : Target operating system for cross compiling. + +`FPCTARGETCPU` : Target CPU for cross compiling. +]], + }, +} |
