{"id":2224,"date":"2022-07-08T07:05:11","date_gmt":"2022-07-08T01:35:11","guid":{"rendered":"https:\/\/smarttech101.com\/?p=2224"},"modified":"2023-08-31T12:46:08","modified_gmt":"2023-08-31T07:16:08","slug":"nvim-lsp-set-up-null-ls-for-beginners","status":"publish","type":"post","link":"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/","title":{"rendered":"Nvim lsp: set up null-ls for beginners"},"content":{"rendered":"\n<p>Null-ls&#8217;s unofficial full form is null-language-server i.e. it is a sort of language server which does not provide any services such as formatting and diagnostics you expect from a language server. Instead of that, you will need to install corresponding external &#8220;sources&#8221; and then hook these sources into the neovim lsp client through null-ls.<\/p>\n\n\n\n<p>For example, bash-language-server does not provide formatting services. Therefore, the formatting nvim commands <code>:vim.lsp.buf.formatting() or vim.lsp.buf.formatting_sync()<\/code> (in nvim v 0.8, <code>vim.lsp.buf.format<\/code>) will not work. For them to work, you need to install an external formatter called <a href=\"https:\/\/github.com\/mvdan\/sh\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">shfmt<\/a> and hook (merge) <code>shfmt<\/code> into Neovim LSP client by using 1-2 lines of configuration (I will show you that below). Now, the nvim&#8217;s above formatting commands will format your code.<\/p>\n\n\n\n<p>Similarly, I was able to hook <a href=\"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/\" target=\"_blank\" rel=\"noreferrer noopener\">Diagnostics<\/a> and <a href=\"https:\/\/smarttech101.com\/nvim-lsp-configure-language-servers-shortcuts-highlights\/#code_actions_in_nvim_lsp\" target=\"_blank\" rel=\"noreferrer noopener\">Code-Actions<\/a> into the Neovim client using <a href=\"https:\/\/github.com\/koalaman\/shellcheck\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">shellcheck<\/a>.<\/p>\n\n\n\n<p>Using null-ls, you can hook not only formatting, code actions, and diagnostics, but the following services as well:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Hover<\/li>\n\n\n\n<li>Completion<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Table of Contents<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#install_nullls_and_other_packages_and_configure_them\">Install null-ls and other packages and configure them<\/a><\/li>\n\n\n\n<li><a href=\"#formatting_in_nullls\">Formatting in null-ls<\/a>\n<ul class=\"wp-block-list\">\n<li><a href=\"#test_if_the_above_formatting_configuration_in_nullls_is_working\">Test if the above formatting configuration in null-ls is working<\/a><\/li>\n\n\n\n<li><a href=\"#keybindings_for_nvimlsp_formatting\">Keybindings for nvim-lsp formatting<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><a href=\"#diagnostics_linting_in_nullls\">Diagnostics (linting) in null-ls<\/a><\/li>\n\n\n\n<li><a href=\"#code_actions_in_nullls\">Code actions in null-ls<\/a><\/li>\n\n\n\n<li><a href=\"#way_ahead\">Way Ahead<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install_nullls_and_other_packages_and_configure_them\">Install null-ls and other packages and configure them<\/h2>\n\n\n\n<p>First of all, install the null-ls plugin using your favorite plugin manager.<\/p>\n\n\n\n<p>For example, to install using vim-plug*, use the following command in <code>init.vim<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Plug 'jose-elias-alvarez\/null-ls.nvim'<\/code><\/pre>\n\n\n\n<p>*<a href=\"https:\/\/smarttech101.com\/how-to-manage-plugins-in-vim-neovim-ft-vim-plug\/\">Head on over to this article for a detailed and easy guide on managing plugins using vim-plug.<\/a><\/p>\n\n\n\n<p>For this article, I will be using bash-language-server, shfmt, and shellcheck as examples. So, kindly install them as well using your distributions&#8217; package managers:<\/p>\n\n\n\n<p><strong>Using snap<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo snap install bash-language-server<\/code><\/pre>\n\n\n\n<p><strong>On Debian-based distros<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install shellcheck<\/code><\/pre>\n\n\n\n<p><strong>On Fedora-based distributions<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dnf install -y nodejs-bash-language-server\ndnf install shellcheck<\/code><\/pre>\n\n\n\n<p><strong>For Arch Linux, Manjaro, and other Arch Linux-based distributions<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo pacman -S bash-language-server shfmt shellcheck<\/code><\/pre>\n\n\n\n<p>If the above does not cover your distributions\/OSes, head over to the official websites of these packages or search on Google and install them from there. However, always prefer your distributions\/OSes&#8217; package managers because of the ease in the update\/install\/uninstall.<\/p>\n\n\n\n<p>Please set up your bash-language-server if you have not done it. You can follow my article on this <a href=\"https:\/\/smarttech101.com\/nvim-lsp-configure-language-servers-shortcuts-highlights\/\" target=\"_blank\" rel=\"noreferrer noopener\">nvim-lsp setup<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"formatting_in_nullls\">Formatting in null-ls<\/h2>\n\n\n\n<p>Format-commands in nvim-lsp remove\/insert unnecessary tabs\/spaces in your code. Therefore, it beautifies it. <\/p>\n\n\n\n<p>To know more about it, look at my article on <a href=\"https:\/\/smarttech101.com\/nvim-lsp-configure-language-servers-shortcuts-highlights\/#formatting_in_nvim_lsp\" target=\"_blank\" rel=\"noreferrer noopener\">formatting in nvim-lsp<\/a>.<\/p>\n\n\n\n<p>As foretold, for the bash-language-server, the nvim&#8217;s formatting commands <code>:vim.lsp.buf.formatting() or vim.lsp.buf.formatting_sync()<\/code> (in nvim v 0.8, <code>vim.lsp.buf.format<\/code>) will not have any effect.<\/p>\n\n\n\n<p>To make them work, first create a file <code>~\/.config\/nvim\/plug-config\/null-ls.lua<\/code>. In this file, you will be populating all of your plugin-related configurations. You could throw all of your configurations in the <code>init.vim<\/code> or <code>init.lua<\/code> instead but that will be quite a messy configuration. So, I am creating a separate file. Later, I will show you how this file can be &#8220;sourced&#8221; into the <code>init.vim<\/code> using the <code>source<\/code> command.<\/p>\n\n\n\n<p>After creating the file put the following configuration into it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>require(\"null-ls\").setup({\n  sources = {\n    require(\"null-ls\").builtins.formatting.shfmt, -- shell script formatting\n  },\n})<\/code><\/pre>\n\n\n\n<p>In the above configuration, I am using the &#8220;source&#8221; <code>shfmt<\/code>. To find other supported sources, head over to the <a href=\"https:\/\/github.com\/jose-elias-alvarez\/null-ls.nvim\/blob\/main\/doc\/BUILTINS.md\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">list of supported sources<\/a> on the official website.<\/p>\n\n\n\n<p>Or, execute the nvim command <code>:NullLsInfo<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"731\" height=\"458\" src=\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/07\/nulllsinfo-command.png?resize=731%2C458&#038;ssl=1\" alt=\"NullLsInfo shows you supported sources for the given filetype in a floating window\" class=\"wp-image-2229\"\/><figcaption class=\"wp-element-caption\">Figure: <code>:NullLsInfo<\/code> shows you supported sources for the given filetype in a floating window<\/figcaption><\/figure>\n\n\n\n<p>It will be a good practice to bind a key to the above command. For this, you can append the following line in the file <code>~\/.config\/nvim\/plug-config\/null-ls.lua<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim.cmd('map &lt;Leader&gt;ln :NullLsInfo&lt;CR&gt;')<\/code><\/pre>\n\n\n\n<p>The above formatting configuration was for <code>sh<\/code> file type. For other filetypes, follow the similar procedure.<\/p>\n\n\n\n<p>For example, for markdown formatting, open a markdown file, and execute the <code>:NullLsInfo<\/code> command, it will show you supported formatting sources. If you like to use the source <code>prettier<\/code>, use the <code>prettier<\/code> line in <code>sources = {}<\/code> in the following fashion:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>require(\"null-ls\").setup({\n  sources = {\n    require(\"null-ls\").builtins.formatting.shfmt, -- shell script formatting\n    require(\"null-ls\").builtins.formatting.prettier, -- markdown formatting\n  },\n})<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"test_if_the_above_formatting_configuration_in_nullls_is_working\">Test if the above formatting configuration in null-ls is working<\/h3>\n\n\n\n<p>Now as a test, go ahead and destroy the formatting of one of your <a href=\"https:\/\/smarttech101.com\/how-to-create-shell-scripts-in-linux-unix\/\" target=\"_blank\" rel=\"noreferrer noopener\">shell scripts<\/a> by inserting unnecessary tabs and spaces. Now, execute the nvim formatting command. You will see the removal of unnecessary tabs and spaces.<\/p>\n\n\n\n<p>I will recommend you bind the formatting commands with some key(s) as shown below.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"keybindings_for_nvimlsp_formatting\">Keybindings for nvim-lsp formatting<\/h3>\n\n\n\n<p>Append the following lines to the file <code>~\/.config\/nvim\/plug-config\/null-ls.lua<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim.cmd('map &lt;Leader&gt;lf :lua vim.lsp.buf.formatting_sync(nil, 10000)&lt;CR&gt;')<\/code><\/pre>\n\n\n\n<p>If you get <code>timeout<\/code> error on executing the above shortcut, which might happen on a long file, increase the number. <code>10000<\/code> is already a very big number, so the error is highly unlikely.<\/p>\n\n\n\n<p><strong>Note 1:<\/strong> Please note that the formatting command is a little different in nvim v 0.8:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>-- 0.7\nvim.lsp.buf.formatting_sync(nil, 2000) -- 2 seconds\n\n-- 0.8\nvim.lsp.buf.format({ timeout_ms = 2000 }) -- 2 seconds<\/code><\/pre>\n\n\n\n<p><strong>Note 2:<\/strong> If you already have bound key(s) for the formatting command(s), there is no need to rebind using the above method.<\/p>\n\n\n\n<p>Some sources (but not the <code>shfmt<\/code>) support range formatting as well. For this, append the following line in the file <code>~\/.config\/nvim\/plug-config\/null-ls.lua<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim.cmd('map &lt;Leader&gt;lF :lua vim.lsp.buf.range_formatting()&lt;CR&gt;')<\/code><\/pre>\n\n\n\n<p>Now, you can visually select the lines (using the standard vim key <code>Shift+v<\/code>) on which you want to apply the formatting and press the shortcut key. The Rest of the lines will be untouched.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"diagnostics_linting_in_nullls\">Diagnostics (linting) in null-ls<\/h2>\n\n\n\n<p>Nvim lsp diagnostics (also known as \u201clinting\u201d) enables you to&nbsp;<strong>see Errors, Warnings, Hints, and information right on your screen while coding<\/strong>. It, therefore, prevents you from having most of the debugging headaches later.<\/p>\n\n\n\n<p>To know more about it, head over to my article on <a href=\"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/\" target=\"_blank\" rel=\"noreferrer noopener\">diagnostics in nvim-lsp<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1051\" height=\"652\" src=\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/1.jpg?resize=1051%2C652&#038;ssl=1\" alt=\"Diagnostics in bash-language-server pulled from shellcheck\" class=\"wp-image-2055\" srcset=\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/1.jpg?w=1051&amp;ssl=1 1051w, https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/1.jpg?resize=768%2C476&amp;ssl=1 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><figcaption class=\"wp-element-caption\">Figure: Diagnostics in bash-language-server pulled from shellcheck<\/figcaption><\/figure>\n\n\n\n<p>By default, the bash-language-server server does not provide diagnostics services.<\/p>\n\n\n\n<p>Now, to get the diagnostics enabled use the following code in your file <code>~\/.config\/nvim\/plug-config\/null-ls.lua<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>require(\"null-ls\").setup({\n  sources = {\n    require(\"null-ls\").builtins.formatting.shfmt, -- shell script formatting\n    require(\"null-ls\").builtins.formatting.prettier, -- markdown formatting\n    require(\"null-ls\").builtins.diagnostics.shellcheck, -- shell script diagnostics\n  },\n})<\/code><\/pre>\n\n\n\n<p>Just add the <code>shellcheck<\/code> line from the above code in the file. There is no need to repeat\/remove other configurations from the file.<\/p>\n\n\n\n<p>Now, open a shell script and you will see diagnostics printed on your terminal.<\/p>\n\n\n\n<p><strong>Note<\/strong>: with the recent update of bash-language-server, you don&#8217;t have to follow this heading. Now, bash-language-server uses the shellcheck if installed for the linting. Nonetheless, this method is still useful for other scenarios.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"code_actions_in_nullls\">Code actions in null-ls<\/h2>\n\n\n\n<p>Diagnostics show you the errors and warnings in your code. On the other hand, <a href=\"https:\/\/smarttech101.com\/nvim-lsp-configure-language-servers-shortcuts-highlights\/#code_actions_in_nvim_lsp\" target=\"_blank\" rel=\"noreferrer noopener\">code actions<\/a> are available suggestions to fix\/remove these errors and warnings. Not all language servers provide this service. To fill this gap, you can use null-ls.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"731\" height=\"458\" src=\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/06\/nvim-lsp-code-action.png?resize=731%2C458&#038;ssl=1\" alt=\"code actions in nvim-lsp (shown at the bottom)\" class=\"wp-image-2090\"\/><figcaption class=\"wp-element-caption\">Figure: code actions in nvim-lsp (shown at the bottom) from shellcheck<\/figcaption><\/figure>\n\n\n\n<p>To hook code actions from shellcheck into the neovim client, insert the line <code>require(\"null-ls\").builtins.code_actions.shellcheck,<\/code> in the file <code>~\/.config\/nvim\/plug-config\/null-ls.lua<\/code> in the following fashion:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>require(\"null-ls\").setup({\n  sources = {\n    require(\"null-ls\").builtins.formatting.shfmt, -- shell script formatting\n    require(\"null-ls\").builtins.formatting.prettier, -- markdown formatting\n    require(\"null-ls\").builtins.diagnostics.shellcheck, -- shell script diagnostics\n    require(\"null-ls\").builtins.code_actions.shellcheck, -- shell script code actions\n  },\n})<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"way_ahead\">Way Ahead<\/h2>\n\n\n\n<p>To use other null-ls features such as &#8220;Hover&#8221; (example &#8211; on hovering on a word, you would get its meaning; it is good for language learners), how to create a source, etc. see the <a href=\"https:\/\/github.com\/jose-elias-alvarez\/null-ls.nvim\/blob\/main\/doc\/MAIN.md\" target=\"_blank\" rel=\"noreferrer noopener\">official null-ls documentation<\/a><\/p>\n\n\n\n<p>And don&#8217;t forget to source the file <code>~\/.config\/nvim\/plug-config\/null-ls.lua<\/code> in your <code>init.vim<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>source $HOME\/.config\/nvim\/plug-config\/null-ls.lua<\/code><\/pre>\n\n\n\n<p>In order to completely set up your Nvim-lsp, please go through all articles in the&nbsp;<a href=\"https:\/\/smarttech101.com\/tag\/nvim-lsp\/\" target=\"_blank\" rel=\"noreferrer noopener\">nvim-lsp series<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article helps you enhance your lsp server&#8217;s capability or create one using null-ls. It covers diagnostics, formatting, code actions, and other null-ls features with examples and images.<\/p>\n","protected":false},"author":2,"featured_media":2227,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[37],"tags":[40,39,41],"class_list":["post-2224","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-neovim","tag-neovim","tag-nvim","tag-nvim-lsp"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Nvim lsp: set up null-ls for beginners | SmartTech101<\/title>\n<meta name=\"description\" content=\"This article helps you enhance your lsp server&#039;s capability or create one using null-ls. It covers diagnostics, formatting, and code actions.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Nvim lsp: set up null-ls for beginners | SmartTech101\" \/>\n<meta property=\"og:description\" content=\"This article helps you enhance your lsp server&#039;s capability or create one using null-ls. It covers diagnostics, formatting, and code actions.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/\" \/>\n<meta property=\"og:site_name\" content=\"SmartTech101\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-08T01:35:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-31T07:16:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/smarttech101.com\/wp-content\/uploads\/2022\/07\/null-ls-for-beginners.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ajay\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ajay_yadav\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ajay\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/\"},\"author\":{\"name\":\"Ajay\",\"@id\":\"https:\/\/smarttech101.com\/#\/schema\/person\/2edfee738a82f9c963210f8cdb438334\"},\"headline\":\"Nvim lsp: set up null-ls for beginners\",\"datePublished\":\"2022-07-08T01:35:11+00:00\",\"dateModified\":\"2023-08-31T07:16:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/\"},\"wordCount\":1082,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/smarttech101.com\/#\/schema\/person\/e8d5aebc510d698e11e9df6291381633\"},\"image\":{\"@id\":\"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/07\/null-ls-for-beginners.png?fit=1280%2C720&ssl=1\",\"keywords\":[\"neovim\",\"nvim\",\"nvim-lsp\"],\"articleSection\":[\"Neovim\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/\",\"url\":\"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/\",\"name\":\"Nvim lsp: set up null-ls for beginners | SmartTech101\",\"isPartOf\":{\"@id\":\"https:\/\/smarttech101.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/07\/null-ls-for-beginners.png?fit=1280%2C720&ssl=1\",\"datePublished\":\"2022-07-08T01:35:11+00:00\",\"dateModified\":\"2023-08-31T07:16:08+00:00\",\"description\":\"This article helps you enhance your lsp server's capability or create one using null-ls. It covers diagnostics, formatting, and code actions.\",\"breadcrumb\":{\"@id\":\"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/07\/null-ls-for-beginners.png?fit=1280%2C720&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/07\/null-ls-for-beginners.png?fit=1280%2C720&ssl=1\",\"width\":1280,\"height\":720,\"caption\":\"nvim-lsp: null-ls for beginners\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/smarttech101.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Nvim lsp: set up null-ls for beginners\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/smarttech101.com\/#website\",\"url\":\"https:\/\/smarttech101.com\/\",\"name\":\"SmartTech101\",\"description\":\"Do Everything in Linux\",\"publisher\":{\"@id\":\"https:\/\/smarttech101.com\/#\/schema\/person\/e8d5aebc510d698e11e9df6291381633\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/smarttech101.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/smarttech101.com\/#\/schema\/person\/e8d5aebc510d698e11e9df6291381633\",\"name\":\"Ajay Yadav\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/smarttech101.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/09\/cropped-ST101_logo.png?fit=180%2C60&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/09\/cropped-ST101_logo.png?fit=180%2C60&ssl=1\",\"width\":180,\"height\":60,\"caption\":\"Ajay Yadav\"},\"logo\":{\"@id\":\"https:\/\/smarttech101.com\/#\/schema\/person\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/smarttech101.com\/#\/schema\/person\/2edfee738a82f9c963210f8cdb438334\",\"name\":\"Ajay\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/smarttech101.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6eea348caae2173954765a7cdf6cd107?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6eea348caae2173954765a7cdf6cd107?s=96&d=mm&r=g\",\"caption\":\"Ajay\"},\"sameAs\":[\"https:\/\/x.com\/ajay_yadav\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Nvim lsp: set up null-ls for beginners | SmartTech101","description":"This article helps you enhance your lsp server's capability or create one using null-ls. It covers diagnostics, formatting, and code actions.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/","og_locale":"en_US","og_type":"article","og_title":"Nvim lsp: set up null-ls for beginners | SmartTech101","og_description":"This article helps you enhance your lsp server's capability or create one using null-ls. It covers diagnostics, formatting, and code actions.","og_url":"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/","og_site_name":"SmartTech101","article_published_time":"2022-07-08T01:35:11+00:00","article_modified_time":"2023-08-31T07:16:08+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/smarttech101.com\/wp-content\/uploads\/2022\/07\/null-ls-for-beginners.png","type":"image\/png"}],"author":"Ajay","twitter_card":"summary_large_image","twitter_creator":"@ajay_yadav","twitter_misc":{"Written by":"Ajay","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/#article","isPartOf":{"@id":"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/"},"author":{"name":"Ajay","@id":"https:\/\/smarttech101.com\/#\/schema\/person\/2edfee738a82f9c963210f8cdb438334"},"headline":"Nvim lsp: set up null-ls for beginners","datePublished":"2022-07-08T01:35:11+00:00","dateModified":"2023-08-31T07:16:08+00:00","mainEntityOfPage":{"@id":"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/"},"wordCount":1082,"commentCount":2,"publisher":{"@id":"https:\/\/smarttech101.com\/#\/schema\/person\/e8d5aebc510d698e11e9df6291381633"},"image":{"@id":"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/07\/null-ls-for-beginners.png?fit=1280%2C720&ssl=1","keywords":["neovim","nvim","nvim-lsp"],"articleSection":["Neovim"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/","url":"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/","name":"Nvim lsp: set up null-ls for beginners | SmartTech101","isPartOf":{"@id":"https:\/\/smarttech101.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/#primaryimage"},"image":{"@id":"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/07\/null-ls-for-beginners.png?fit=1280%2C720&ssl=1","datePublished":"2022-07-08T01:35:11+00:00","dateModified":"2023-08-31T07:16:08+00:00","description":"This article helps you enhance your lsp server's capability or create one using null-ls. It covers diagnostics, formatting, and code actions.","breadcrumb":{"@id":"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/#primaryimage","url":"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/07\/null-ls-for-beginners.png?fit=1280%2C720&ssl=1","contentUrl":"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/07\/null-ls-for-beginners.png?fit=1280%2C720&ssl=1","width":1280,"height":720,"caption":"nvim-lsp: null-ls for beginners"},{"@type":"BreadcrumbList","@id":"https:\/\/smarttech101.com\/nvim-lsp-set-up-null-ls-for-beginners\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/smarttech101.com\/"},{"@type":"ListItem","position":2,"name":"Nvim lsp: set up null-ls for beginners"}]},{"@type":"WebSite","@id":"https:\/\/smarttech101.com\/#website","url":"https:\/\/smarttech101.com\/","name":"SmartTech101","description":"Do Everything in Linux","publisher":{"@id":"https:\/\/smarttech101.com\/#\/schema\/person\/e8d5aebc510d698e11e9df6291381633"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/smarttech101.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/smarttech101.com\/#\/schema\/person\/e8d5aebc510d698e11e9df6291381633","name":"Ajay Yadav","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/smarttech101.com\/#\/schema\/person\/image\/","url":"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/09\/cropped-ST101_logo.png?fit=180%2C60&ssl=1","contentUrl":"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/09\/cropped-ST101_logo.png?fit=180%2C60&ssl=1","width":180,"height":60,"caption":"Ajay Yadav"},"logo":{"@id":"https:\/\/smarttech101.com\/#\/schema\/person\/image\/"}},{"@type":"Person","@id":"https:\/\/smarttech101.com\/#\/schema\/person\/2edfee738a82f9c963210f8cdb438334","name":"Ajay","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/smarttech101.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6eea348caae2173954765a7cdf6cd107?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6eea348caae2173954765a7cdf6cd107?s=96&d=mm&r=g","caption":"Ajay"},"sameAs":["https:\/\/x.com\/ajay_yadav"]}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/07\/null-ls-for-beginners.png?fit=1280%2C720&ssl=1","_links":{"self":[{"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/posts\/2224"}],"collection":[{"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/comments?post=2224"}],"version-history":[{"count":5,"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/posts\/2224\/revisions"}],"predecessor-version":[{"id":3097,"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/posts\/2224\/revisions\/3097"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/media\/2227"}],"wp:attachment":[{"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/media?parent=2224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/categories?post=2224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/tags?post=2224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}