[Expelmental] A sql language server exclusively for sqlfluff.
- "Server" by
sqlfluff-language-server
command (pygls based language server) - "Client" by
coc-sqlfluff-ls
(For operation test)
- Lint
- Format
- Code Action
sqlfluff-language-server is a language server that uses the sqlfluff API.
setup:
poetry install
poetry shell
sqlfluff-language-server --help
help:
usage: sqlfluff-language-server [-h] [--version] [--tcp] [--host HOST]
[--port PORT] [--log-file LOG_FILE] [-v]
sqlfluff-language-server
optional arguments:
-h, --help show this help message and exit
--version display version information and exit
--tcp Use TCP server instead of stdio
--host HOST Bind to this address
--port PORT Bind to this port
--log-file LOG_FILE redirect logs to the given file instead of writing to
stderr
-v, --verbose increase verbosity of log output
default:
stdio
yarn install
# or yarn build
Now set runtimepath^=/path/to/sqlfluff-language-server
in "vimrc/init.vim"
if executable('sqlfluff-language-server')
augroup LspVim
au!
autocmd User lsp_setup call lsp#register_server({
\ 'name': 'sqlfluff-language-server',
\ 'cmd': {server_info->['sqlfluff-language-server']},
\ 'allowlist': ['sql'],
\ })
augroup END
endif
- yaegassy/coc-sqlfluff
- Using the sqlfluff CLI
MIT