Closed mushi-nova closed 3 years ago
g:coc_status isn't a diagnostic source . See here for valid sources ; In your caae it should be 'coc'.
diff should work. Are you in a file that is under git version control and is differs from staged worktree ?
What does
git --no-pager diff --no-color --no-ext-diff -U0 -- ${your file path}
show ?
I actually tried the diagnostic
with source = 'coc'
but it didn't work out so later on tried it with source = g:coc_status
. Yet the result was the same.
Moving on to the next question. I'm not getting any output for the same. I'm using src/main.rs
for the file path within my Rust project file.
I actually tried the diagnostic with source = 'coc' but it didn't work out so later on tried it with source = g:coc_status. Yet the result was the same.
Rust analyzer can take a while to index project and it's dependencies . coc won't give diagnostics until that's done . When you say you can't get diagnostics working does coc give diagnostics in that time ? I mean do you see errors or wanrings on your file?
I actually tried the diagnostic with source = 'coc' but it didn't work out so later on tried it with source = g:coc_status. Yet the result was the same.
Does the file differ from your commited and staged version of the file ?
I get a similar issue but I get the error no sources for diagnostics configured
. My config:
require "lualine".setup {
options = {
icons_enabled = true,
theme = "everforest",
component_separators = {"", ""},
section_separators = {"", ""},
disabled_filetypes = {}
},
sections = {
lualine_a = {"mode", "paste"},
lualine_b = {"branch", "diff"},
lualine_c = { "diagnostics", source = {"nvim_lsp" }},
lualine_x = {"filetype"},
lualine_y = {"progress"},
lualine_z = {"location"}
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {"filename"},
lualine_x = {"location"},
lualine_y = {},
lualine_z = {}
},
tabline = {},
extensions = {}
}
compe is using nvim_lsp
with no issues in the same config. Am I writing this incorrectly?
@beauwilliams It's sources
not source
see here
Sorry, it's my bad then. Changing it to sources
did the trick and thanks a lot. Mind telling me what's causing diff
not to show any sort of output.
Mind telling me what's causing diff not to show any sort of output.
Moving on to the next question. I'm not getting any output for the same
lualine gets the diff counts from that git command I gave you earlier . If it's not outputing anything then something is wrong with your git setup . There's really no way how I can know what's wrong there ;)
Thanks a lot. Indeed there were few things wrong with my git setup.
I've been trying to make the
diff
anddiagnostics
modules to work but unable to achieve it. Though there are no errors or anything to prevent that.Actual behaviour
Expected behaviour
To show the
diff
anddiagnostic
signs but all are absent or not getting triggered.My Config
Versions: