<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>lsp on Coffee and Contemplation</title><link>https://coffeeandcontemplation.dev/tags/lsp/</link><description>Recent content in lsp on Coffee and Contemplation</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><managingEditor>dev@gmail.com (dev)</managingEditor><webMaster>dev@gmail.com (dev)</webMaster><lastBuildDate>Thu, 14 Jan 2021 00:00:00 +0000</lastBuildDate><atom:link href="https://coffeeandcontemplation.dev/tags/lsp/index.xml" rel="self" type="application/rss+xml"/><item><title>Autocomplete in neovim with built-in LSP client</title><link>https://coffeeandcontemplation.dev/post/2021-01-14-autocomplete-in-neovim/</link><pubDate>Thu, 14 Jan 2021 00:00:00 +0000</pubDate><author>dev@gmail.com (dev)</author><guid>https://coffeeandcontemplation.dev/post/2021-01-14-autocomplete-in-neovim/</guid><description>In the last blog post, we saw how to setup the built-in lsp client in neovim for diagnostics and such. Now we&amp;rsquo;ll see how to setup autocomplete.
First, install completion-nvim. Add this to your vimrc and run PlugInstall.
Plug &amp;#39;nvim-lua/completion-nvim&amp;#39; Now, in the lsp_config.lua file, you need to make some changes. The file should look like this:
lspconfig = require&amp;#39;lspconfig&amp;#39; completion_callback = require&amp;#39;completion&amp;#39;.on_attach lspconfig.pyls.setup{on_attach=completion_callback} lspconfig.tsserver.setup{on_attach=completion_callback} lspconfig.rust_analyzer.setup{on_attach=completion_callback} This should give you completion.</description></item><item><title>Language Server Client in neovim</title><link>https://coffeeandcontemplation.dev/post/2021-01-10-language-server-in-vim/</link><pubDate>Sun, 10 Jan 2021 00:00:00 +0000</pubDate><author>dev@gmail.com (dev)</author><guid>https://coffeeandcontemplation.dev/post/2021-01-10-language-server-in-vim/</guid><description>What is language server protocol? Development becomes a lot easier if all languages support features like autocomplete, linting, go-to-definition etc. within the editor of your choice. But this is a difficult task for editor devs. Each editor has to build support or integrate with tools that provide language support. Each of these tools behave in different ways making integration difficult. Language server protocol was defined by microsoft to put and end to this.</description></item></channel></rss>