nvim --version:NVIM v0.5.0-751-gd198aa511
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-5 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/travis/build/neovim/bot-ci/build/neovim/build/config -I/home/travis/build/neovim/bot-ci/build/neovim/src -I/home/travis/build/neovim/bot-ci/build/neovim/.deps/usr/include -I/usr/include -I/home/travis/build/neovim/bot-ci/build/neovim/build/src/nvim/auto -I/home/travis/build/neovim/bot-ci/build/neovim/build/include
Compiled by travis@travis-job-7fcf59ed-01e6-4dcf-a363-4c9cb0163aca
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/share/nvim"
Run :checkhealth for more info
:checkhealth resulthealth#nvim_lsp#check
========================================================================
## Checking language server protocol configuration
- INFO: pyls: configuration checked.
- INFO: rust_analyzer: configuration checked.
health#nvim#check
========================================================================
## Configuration
- OK: no issues found
## Performance
- OK: Build type: RelWithDebInfo
## Remote Plugins
- OK: Up to date
## terminal
- INFO: key_backspace (kbs) terminfo entry: key_backspace=^H
- INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
- INFO: $COLORTERM='truecolor'
$TERM: xterm-256colorinit.vim
---------
call plug#begin($HOME.'/.config/nvim/autoload/plugged')
Plug 'neovim/nvim-lspconfig'
Plug 'nvim-lua/diagnostic-nvim'
call plug#end()
lua <<EOF
require'nvim_lsp'.pyls.setup{on_attach=require'diagnostic'.on_attach}
require'nvim_lsp'.rust_analyzer.setup{on_attach=require'diagnostic'.on_attach}
EOF
let g:diagnostic_enable_virtual_text = 1
let g:space_before_virtual_text = 20
Create a random python file and write some gibberish:

As you can see, there are no syntax errors, mismatched brackets, "no member" errors etc. In fact I have been unable to force it to show anything other than whitespace warnings (like "trailing whitespace", "expected indentation block" or "expected 2 empty lines and found 1" ).
There should be an error in pretty much every single line above. Compare it to what happens with __rust_analyzer__:

Now, if I add the lsp-status plugin and run
:echo luaeval("require('lsp-status').diagnostics()")
I also only get the 1 warning in that ridiculous python file, which (combined with the fact that rust works just fine) leads me to belive the problem is in the language server itself. Any advice on how to fix this?
I suspect it's because of how you installed the server. Note that pyls leans on pylint, pyflakes, pycodestyle and pydocstyle for diagnostics. But these aren't installed by default.
You can use something like pip3 install 'python-language-server[all]' to install all its dependencies. Alternatively install the linters you're interested in manually.
Hey, thank you so much for the quick reply. You are correct, after installing flake8 the code is linted the way it should. I had pylint installed already and thought that it would be sufficient by itself. Thanks again!
Most helpful comment
I suspect it's because of how you installed the server. Note that pyls leans on pylint, pyflakes, pycodestyle and pydocstyle for diagnostics. But these aren't installed by default.
You can use something like
pip3 install 'python-language-server[all]'to install all its dependencies. Alternatively install the linters you're interested in manually.