fix(diagnostics): check for vim.diagnostics for 0.5.1 users

This commit is contained in:
Matt Leong 2021-10-20 13:09:06 -07:00
parent 093fbc0f78
commit 3265d8233a
2 changed files with 16 additions and 14 deletions

View file

@ -2,18 +2,20 @@ local icons = require('cosmic.core.theme.icons')
local M = {}
function M.init()
vim.diagnostic.config({
underline = true,
update_in_insert = false,
virtual_text = {
spacing = 4,
source = 'always',
-- severity = 'error'
-- prefix = '👾',
},
signs = true,
severity_sort = true,
})
if vim.diagnostic ~= nil then
vim.diagnostic.config({
underline = true,
update_in_insert = false,
virtual_text = {
spacing = 4,
source = 'always',
-- severity = 'error'
-- prefix = '👾',
},
signs = true,
severity_sort = true,
})
end
local function do_diagnostic_signs()
local signs = {

View file

@ -33,7 +33,7 @@ _While CosmicNvim is geared specifically toward TypeScript/JavaScript developmen
### How to install
_Requires Neovim (>=0.5.1)_
_Runs best on Neovim (>=0.6.0) but requires (>=0.5.1)_
Using [stow](https://www.gnu.org/software/stow/)
@ -64,7 +64,7 @@ You will need to set up Packers compiled file via the steps below:
1. Start NVIM
2. Run `PackerUpdate` & `PackerCompile`
3. Restart NVIM
4. Install LSPServers, `:LspInstallInfo` or `:LspInstall tsserver`
4. Install LSP servers, `:LspInstallInfo` or `:LspInstall tsserver`
_Install script coming soon..._