From 450dcf6298d7bb69126063da7f3241e9afdb77a5 Mon Sep 17 00:00:00 2001 From: Jordan <45881807+jordaniza@users.noreply.github.com> Date: Mon, 29 May 2023 19:13:04 +0400 Subject: [PATCH] Update README.md Added additional on_attach and capabilities to nvim-lspconfig --- server/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/README.md b/server/README.md index e3ff4f97..9164c5fa 100644 --- a/server/README.md +++ b/server/README.md @@ -34,11 +34,16 @@ For coc the extension for this language server (found [here](https://www.npmjs.c To run the language server directly through the neovim lsp (assuming [neovim/nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)) ```sh -local lspconfig = require 'lspconfig' +local on_attach = require("plugins.configs.lspconfig").on_attach +local capabilities = require("plugins.configs.lspconfig").capabilities + +local lspconfig = require "lspconfig" local configs = require 'lspconfig.configs' configs.solidity = { default_config = { + on_attach = on_attach, + capabilities = capabilities, cmd = {'nomicfoundation-solidity-language-server', '--stdio'}, filetypes = { 'solidity' }, root_dir = lspconfig.util.find_git_ancestor,