{"id":2052,"date":"2022-05-26T20:20:29","date_gmt":"2022-05-26T14:50:29","guid":{"rendered":"https:\/\/smarttech101.com\/?p=2052"},"modified":"2023-03-31T17:35:11","modified_gmt":"2023-03-31T12:05:11","slug":"nvim-lsp-diagnostics-keybindings-signs-virtual-texts","status":"publish","type":"post","link":"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/","title":{"rendered":"Nvim lsp diagnostics &#8211; keybindings, signs, virtual texts"},"content":{"rendered":"\n<p>Nvim lsp diagnostics (also known as &#8220;linting&#8221;) enables you to <strong>see Errors, Warnings, Hints, and Informations 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>\ud83d\udcd3 <strong>Note: Follow this article step by step to avoid any problems.<\/strong><\/p>\n\n\n\n<p>If have not <a href=\"https:\/\/smarttech101.com\/how-to-configure-neovim\/\" target=\"_blank\" rel=\"noreferrer noopener\">set up basic configuration in Neovim, do that over here<\/a>. This article is part of my series on setting up Nvim Lsp (Neovim Language Server Protocol):<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/smarttech101.com\/nvim-lsp-configure-language-servers-shortcuts-highlights\/\" target=\"_blank\" rel=\"noreferrer noopener\">Nvim lsp: configure language servers, shortcuts for listing your symbols, rename, code actions, get definition\/declaration, workspace, highlights<\/a><\/li>\n\n\n\n<li>Nvim lsp: diagnostics &#8211; keybindings, signs, virtual texts (this article)<\/li>\n\n\n\n<li><a href=\"https:\/\/smarttech101.com\/nvim-lsp-autocompletion-mapping-snippets-fuzzy-search\/\" target=\"_blank\" rel=\"noreferrer noopener\">Nvim lsp: autocompletion &#8211; mapping, snippets, fuzzy search, and icons<\/a><\/li>\n<\/ol>\n\n\n\n<p>I recommend you to follow all three articles in the above order.<\/p>\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=\"#key_bindings_in_nvim_lsp_diagnostics\">Key bindings in nvim lsp diagnostics<\/a><\/li>\n\n\n\n<li><a href=\"#severity_signs_in_nvim_lsp_diagnostics\">Severity signs in nvim lsp diagnostics<\/a><\/li>\n\n\n\n<li><a href=\"#print_diagnostics_in_the_message_area\">Print diagnostics in the message area<\/a><\/li>\n\n\n\n<li><a href=\"#configuration_of_virtual_and_floating_text\">Configuration of virtual and floating text<\/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=\"key_bindings_in_nvim_lsp_diagnostics\">Key bindings in nvim lsp diagnostics<\/h2>\n\n\n\n<p>Now, we will set up key bindings to move from one error\/warning to another, and open all errors in a new window.<\/p>\n\n\n\n<p>Create a file <code>~\/.config\/nvim\/plug-config\/diagnostics.lua<\/code> with the following content in it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim.api.nvim_set_keymap('n', '&lt;leader&gt;do', '&lt;cmd&gt;lua vim.diagnostic.open_float()&lt;CR&gt;', { noremap = true, silent = true })\nvim.api.nvim_set_keymap('n', '&lt;leader&gt;d&#91;', '&lt;cmd&gt;lua vim.diagnostic.goto_prev()&lt;CR&gt;', { noremap = true, silent = true })\nvim.api.nvim_set_keymap('n', '&lt;leader&gt;d]', '&lt;cmd&gt;lua vim.diagnostic.goto_next()&lt;CR&gt;', { noremap = true, silent = true })\n-- The following command requires plug-ins \"nvim-telescope\/telescope.nvim\", \"nvim-lua\/plenary.nvim\", and optionally \"kyazdani42\/nvim-web-devicons\" for icon support\nvim.api.nvim_set_keymap('n', '&lt;leader&gt;dd', '&lt;cmd&gt;Telescope diagnostics&lt;CR&gt;', { noremap = true, silent = true })\n-- If you don't want to use the telescope plug-in but still want to see all the errors\/warnings, comment out the telescope line and uncomment this:\n-- vim.api.nvim_set_keymap('n', '&lt;leader&gt;dd', '&lt;cmd&gt;lua vim.diagnostic.setloclist()&lt;CR&gt;', { noremap = true, silent = true })<\/code><\/pre>\n\n\n\n<p>Here,<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Just go to any line containing error\/warning and press &lt;leader&gt;do, you will be able to open the error\/warning &#8216;texts&#8217; in a new floating window (see figure 4)<\/li>\n\n\n\n<li>Use <code>&lt;leader&gt;d[<\/code> to move to the next warning\/error.<\/li>\n\n\n\n<li>Use <code>&lt;leader&gt;d]<\/code> to Go to previous warning\/error.<\/li>\n\n\n\n<li>You can use <code>&lt;leader&gt;dd<\/code> for the error\/warnings in a telescope window (see figure 1).<\/li>\n\n\n\n<li>The sign &#8220;<code>--<\/code>&#8221; is used to comment out any line in a Lua file.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"908\" height=\"598\" src=\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/2022-05-26_193400.877118514.png?resize=908%2C598&#038;ssl=1\" alt=\"See :help vim.diagnostic.* for to know more about above functions.\" class=\"wp-image-2066\" srcset=\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/2022-05-26_193400.877118514.png?w=908&amp;ssl=1 908w, https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/2022-05-26_193400.877118514.png?resize=768%2C506&amp;ssl=1 768w\" sizes=\"(max-width: 908px) 100vw, 908px\" \/><figcaption class=\"wp-element-caption\">Fig 1: nvim diagnostics in telescope window<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"severity_signs_in_nvim_lsp_diagnostics\">Severity signs in nvim lsp diagnostics<\/h2>\n\n\n\n<p>&#8220;Severity signs&#8221; are signs for severity levels of problems in your code. <strong>By default, they are <code>E<\/code> for Error, <code>W<\/code> for Warning, <code>H<\/code> for Hints, <code>I<\/code> for Informations. <\/strong>They are <strong>shown in the sign column on the left-most side<\/strong> (see figure 1). To change them, use the following lines into <code>~\/.config\/nvim\/plug-config\/diagnostics.lua<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>local signs = { Error = \"\uf659 \", Warn = \"\uf529 \", Hint = \"\uf835 \", Info = \"\uf449 \" }\nfor type, icon in pairs(signs) do\n  local hl = \"DiagnosticSign\" .. type\n  vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })\nend<\/code><\/pre>\n\n\n\n<p><strong>Note: you might not see the above signs in your browser because these signs are taken from the nerd fonts. Therefore, to see them, you need to use the nerd fonts in your terminal.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"print_diagnostics_in_the_message_area\">Print diagnostics in the message area<\/h2>\n\n\n\n<p>The message area in neovim is the area you see <strong>at the bottom<\/strong> (Figure 2). If you want to print error\/warning\/hints\/information in the message area when your cursor is on any line having them, put the following lines in the <code>~\/.config\/nvim\/plug-config\/diagnostics.lua<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function PrintDiagnostics(opts, bufnr, line_nr, client_id)\n  bufnr = bufnr or 0\n  line_nr = line_nr or (vim.api.nvim_win_get_cursor(0)&#91;1] - 1)\n  opts = opts or {&#91;'lnum'] = line_nr}\n\n  local line_diagnostics = vim.diagnostic.get(bufnr, opts)\n  if vim.tbl_isempty(line_diagnostics) then return end\n\n  local diagnostic_message = \"\"\n  for i, diagnostic in ipairs(line_diagnostics) do\n    diagnostic_message = diagnostic_message .. string.format(\"%d: %s\", i, diagnostic.message or \"\")\n    print(diagnostic_message)\n    if i ~= #line_diagnostics then\n      diagnostic_message = diagnostic_message .. \"\\n\"\n    end\n  end\n  vim.api.nvim_echo({{diagnostic_message, \"Normal\"}}, false, {})\nend\nvim.cmd &#91;&#91; autocmd! CursorHold * lua PrintDiagnostics() ]]<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"908\" height=\"625\" src=\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/2022-05-26_060024.jpg?resize=908%2C625&#038;ssl=1\" alt=\"Print diagnostics in message area in nvim-lsp\" class=\"wp-image-2056\" srcset=\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/2022-05-26_060024.jpg?w=908&amp;ssl=1 908w, https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/2022-05-26_060024.jpg?resize=768%2C529&amp;ssl=1 768w\" sizes=\"(max-width: 908px) 100vw, 908px\" \/><figcaption class=\"wp-element-caption\">Fig 2: Print diagnostics in the message area in nvim-lsp<\/figcaption><\/figure>\n\n\n\n<p>Personally, I don&#8217;t use it because <code>&lt;leader&gt;do<\/code> is already doing the same task.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"configuration_of_virtual_and_floating_text\">Configuration of virtual and floating text<\/h2>\n\n\n\n<p><strong>Virtual Text<\/strong>: is the text you see after \u25cf. Two \u25cf means two diagnostics info and so on.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"457\" height=\"110\" src=\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/2022-05-26_061241.jpg?resize=457%2C110&#038;ssl=1\" alt=\"\" class=\"wp-image-2057\"\/><figcaption class=\"wp-element-caption\">Fig 3: virtual text in nvim lsp diagnostics<\/figcaption><\/figure>\n\n\n\n<p><strong>Floating Text<\/strong>: is the text you will see in a floating window after pressing the shortcut <code>&lt;leader&gt;do<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"775\" height=\"384\" src=\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/2022-05-26_061442.jpg?resize=775%2C384&#038;ssl=1\" alt=\"Floating text in nvim-lsp's diagnostics\" class=\"wp-image-2058\" srcset=\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/2022-05-26_061442.jpg?w=775&amp;ssl=1 775w, https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/2022-05-26_061442.jpg?resize=768%2C381&amp;ssl=1 768w\" sizes=\"(max-width: 775px) 100vw, 775px\" \/><figcaption class=\"wp-element-caption\">Fig 4: Floating text in nvim-lsp&#8217;s diagnostics<\/figcaption><\/figure>\n\n\n\n<p>Put the following configuration in the file <code>~\/.config\/nvim\/plug-config\/diagnostics.lua<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vim.diagnostic.config({\n  virtual_text = {\n    -- source = \"always\",  -- Or \"if_many\"\n    prefix = '\u25cf', -- Could be '\u25a0', '\u258e', 'x'\n  },\n  severity_sort = true,\n  float = {\n    source = \"always\",  -- Or \"if_many\"\n  },\n})<\/code><\/pre>\n\n\n\n<p>Here,<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>severity_sort = true<\/code> sets the order in which signs and virtual text are displayed.<\/li>\n\n\n\n<li>Use <code>virtual_text = false<\/code> instead to remove Virtual Text altogether from your Neovim window.<\/li>\n\n\n\n<li><code>prefix<\/code> sets character preceding the virtual text.<\/li>\n\n\n\n<li><code>source = always<\/code> shows diagnostic-source which can be a language server (like <code>pyright<\/code> for python) in the following figure (Figure 5). Use, <code>source = \"if_many\"<\/code> if you want to see the source only when the number of sources is more than one.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"779\" height=\"482\" src=\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/2022-05-26_061903.jpg?resize=779%2C482&#038;ssl=1\" alt=\" sources in floating window (here, in this example, mypy, pyright, etc).\" class=\"wp-image-2059\" srcset=\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/2022-05-26_061903.jpg?w=779&amp;ssl=1 779w, https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/2022-05-26_061903.jpg?resize=768%2C475&amp;ssl=1 768w\" sizes=\"(max-width: 779px) 100vw, 779px\" \/><figcaption class=\"wp-element-caption\">Fig 5: sources in a floating window (here, in this example, <code>mypy<\/code>, <code>pyright<\/code>, etc).<\/figcaption><\/figure>\n\n\n\n<p>Now, source this file in your <code>init.vim<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>source $HOME\/.config\/nvim\/plug-config\/diagnostics.lua<\/code><\/pre>\n\n\n\n<p>\ud83d\udcd3Note: depending upon your project size and computer&#8217;s processing power, you might have to wait for some time before all the virtual texts are printed on your neovim window.<\/p>\n\n\n\n<p><a href=\"https:\/\/smarttech101.com\/how-to-configure-colorscheme-in-vim-neovim\/#highlight_diagnostics_in_neovim_lsp_colorscheme\" target=\"_blank\" rel=\"noreferrer noopener\">Colorize your virtual texts in Neovim diagnostics <\/a>according to this article over here.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"way_ahead\">Way Ahead<\/h2>\n\n\n\n<p>That was a basic configuration for neovim-diagnostics (linting). You can comment below if you have any problems or suggestions.<\/p>\n\n\n\n<p>In order to completely set up your Nvim-lsp, please go through all articles in the <a href=\"https:\/\/smarttech101.com\/tag\/nvim-lsp\/\" target=\"_blank\" rel=\"noreferrer noopener\">nvim-lsp series<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Configure your nvim lsp diagnostics including signs, virtual and floating texts along with key bindings, and many more.<\/p>\n","protected":false},"author":2,"featured_media":2062,"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":"","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":"default","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-2052","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 diagnostics - keybindings, signs, virtual texts | SmartTech101<\/title>\n<meta name=\"description\" content=\"Configure your nvim lsp diagnostics including signs, virtual and floating texts along with key bindings, and many more.\" \/>\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-diagnostics-keybindings-signs-virtual-texts\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Nvim lsp diagnostics - keybindings, signs, virtual texts | SmartTech101\" \/>\n<meta property=\"og:description\" content=\"Configure your nvim lsp diagnostics including signs, virtual and floating texts along with key bindings, and many more.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/\" \/>\n<meta property=\"og:site_name\" content=\"SmartTech101\" \/>\n<meta property=\"article:published_time\" content=\"2022-05-26T14:50:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-31T12:05:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/smarttech101.com\/wp-content\/uploads\/2022\/05\/Debugging-in-Neovim-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1051\" \/>\n\t<meta property=\"og:image:height\" content=\"652\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\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-diagnostics-keybindings-signs-virtual-texts\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/\"},\"author\":{\"name\":\"Ajay\",\"@id\":\"https:\/\/smarttech101.com\/#\/schema\/person\/2edfee738a82f9c963210f8cdb438334\"},\"headline\":\"Nvim lsp diagnostics &#8211; keybindings, signs, virtual texts\",\"datePublished\":\"2022-05-26T14:50:29+00:00\",\"dateModified\":\"2023-03-31T12:05:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/\"},\"wordCount\":653,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/smarttech101.com\/#\/schema\/person\/e8d5aebc510d698e11e9df6291381633\"},\"image\":{\"@id\":\"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/Debugging-in-Neovim-1.jpg?fit=1051%2C652&ssl=1\",\"keywords\":[\"neovim\",\"nvim\",\"nvim-lsp\"],\"articleSection\":[\"Neovim\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/\",\"url\":\"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/\",\"name\":\"Nvim lsp diagnostics - keybindings, signs, virtual texts | SmartTech101\",\"isPartOf\":{\"@id\":\"https:\/\/smarttech101.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/Debugging-in-Neovim-1.jpg?fit=1051%2C652&ssl=1\",\"datePublished\":\"2022-05-26T14:50:29+00:00\",\"dateModified\":\"2023-03-31T12:05:11+00:00\",\"description\":\"Configure your nvim lsp diagnostics including signs, virtual and floating texts along with key bindings, and many more.\",\"breadcrumb\":{\"@id\":\"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/Debugging-in-Neovim-1.jpg?fit=1051%2C652&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/Debugging-in-Neovim-1.jpg?fit=1051%2C652&ssl=1\",\"width\":1051,\"height\":652,\"caption\":\"Debugging in nvim-lsp\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/smarttech101.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Nvim lsp diagnostics &#8211; keybindings, signs, virtual texts\"}]},{\"@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 diagnostics - keybindings, signs, virtual texts | SmartTech101","description":"Configure your nvim lsp diagnostics including signs, virtual and floating texts along with key bindings, and many more.","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-diagnostics-keybindings-signs-virtual-texts\/","og_locale":"en_US","og_type":"article","og_title":"Nvim lsp diagnostics - keybindings, signs, virtual texts | SmartTech101","og_description":"Configure your nvim lsp diagnostics including signs, virtual and floating texts along with key bindings, and many more.","og_url":"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/","og_site_name":"SmartTech101","article_published_time":"2022-05-26T14:50:29+00:00","article_modified_time":"2023-03-31T12:05:11+00:00","og_image":[{"width":1051,"height":652,"url":"https:\/\/smarttech101.com\/wp-content\/uploads\/2022\/05\/Debugging-in-Neovim-1.jpg","type":"image\/jpeg"}],"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-diagnostics-keybindings-signs-virtual-texts\/#article","isPartOf":{"@id":"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/"},"author":{"name":"Ajay","@id":"https:\/\/smarttech101.com\/#\/schema\/person\/2edfee738a82f9c963210f8cdb438334"},"headline":"Nvim lsp diagnostics &#8211; keybindings, signs, virtual texts","datePublished":"2022-05-26T14:50:29+00:00","dateModified":"2023-03-31T12:05:11+00:00","mainEntityOfPage":{"@id":"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/"},"wordCount":653,"commentCount":0,"publisher":{"@id":"https:\/\/smarttech101.com\/#\/schema\/person\/e8d5aebc510d698e11e9df6291381633"},"image":{"@id":"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/Debugging-in-Neovim-1.jpg?fit=1051%2C652&ssl=1","keywords":["neovim","nvim","nvim-lsp"],"articleSection":["Neovim"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/","url":"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/","name":"Nvim lsp diagnostics - keybindings, signs, virtual texts | SmartTech101","isPartOf":{"@id":"https:\/\/smarttech101.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/#primaryimage"},"image":{"@id":"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/Debugging-in-Neovim-1.jpg?fit=1051%2C652&ssl=1","datePublished":"2022-05-26T14:50:29+00:00","dateModified":"2023-03-31T12:05:11+00:00","description":"Configure your nvim lsp diagnostics including signs, virtual and floating texts along with key bindings, and many more.","breadcrumb":{"@id":"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/#primaryimage","url":"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/Debugging-in-Neovim-1.jpg?fit=1051%2C652&ssl=1","contentUrl":"https:\/\/i0.wp.com\/smarttech101.com\/wp-content\/uploads\/2022\/05\/Debugging-in-Neovim-1.jpg?fit=1051%2C652&ssl=1","width":1051,"height":652,"caption":"Debugging in nvim-lsp"},{"@type":"BreadcrumbList","@id":"https:\/\/smarttech101.com\/nvim-lsp-diagnostics-keybindings-signs-virtual-texts\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/smarttech101.com\/"},{"@type":"ListItem","position":2,"name":"Nvim lsp diagnostics &#8211; keybindings, signs, virtual texts"}]},{"@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\/05\/Debugging-in-Neovim-1.jpg?fit=1051%2C652&ssl=1","_links":{"self":[{"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/posts\/2052"}],"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=2052"}],"version-history":[{"count":5,"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/posts\/2052\/revisions"}],"predecessor-version":[{"id":2777,"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/posts\/2052\/revisions\/2777"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/media\/2062"}],"wp:attachment":[{"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/media?parent=2052"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/categories?post=2052"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smarttech101.com\/wp-json\/wp\/v2\/tags?post=2052"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}