From fea4080924a5c23ae6d252d166cd074fd291ec3b Mon Sep 17 00:00:00 2001 From: Zev Averbach Date: Mon, 16 Dec 2024 17:00:39 +0100 Subject: [PATCH] show the definition of lua vars used in 'setting it up in neovim' snippet so it'll work for users out of the box. --- README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 879fe9d53..ec9e70445 100644 --- a/README.md +++ b/README.md @@ -44,17 +44,20 @@ Once the parser is stable, and a robust and scalable data model is implemented, Add the postgres_lsp executable to your path, and add the following to your config to use it. ```lua +local util = require 'lspconfig.util' +local lspconfig = require 'lspconfig' + require('lspconfig.configs').postgres_lsp = { default_config = { name = 'postgres_lsp', - cmd = {'postgres_lsp'}, - filetypes = {'sql'}, + cmd = { 'postgres_lsp' }, + filetypes = { 'sql' }, single_file_support = true, - root_dir = util.root_pattern 'root-file.txt' - } + root_dir = util.root_pattern 'root-file.txt', + }, } -lsp.configure("postgres_lsp", {force_setup = true}) +lspconfig.postgres_lsp.setup { force_setup = true } ``` ### Building from source