Re:Show HN: Postgres Language Server
by swader999 on Sunday August 06, 2023 @01:11PM
(#37024197)
Neovim does this. For example, if you have two lsp configured in nvm-lspconfig.lua as follows, it will use a specific lsp tailored to either SQL or ruby:
-- Initialization of Neovim's LSP client
local nvim_lsp = require('lspconfig')
-- Setup for the Ruby LSP
nvim_lsp.solargraph.setup {}
-- Setup for an SQL LSP (assuming one exists with the name 'sql_lsp' in this example)
nvim_lsp.sql_lsp.setup {}
Re:Show HN: Postgres Language Server
by NilsIRL on Sunday August 06, 2023 @04:05PM
(#37026038)
I think what parent comment is asking for is the ability switch between languages withing a single file. I don't think this will work with the setup you described.
-- Initialization of Neovim's LSP client local nvim_lsp = require('lspconfig')
-- Setup for the Ruby LSP nvim_lsp.solargraph.setup {}
-- Setup for an SQL LSP (assuming one exists with the name 'sql_lsp' in this example) nvim_lsp.sql_lsp.setup {}