Vim: Difference between revisions

imported>Mic92
cquery as youcompleteme alternative.
imported>Mic92
python-language-server
Line 142: Line 142:
</syntaxHighlight>
</syntaxHighlight>


=== ===
=== Vim as a Python IDE ===
 
The following snippet will make a full featured python IDE:
 
<syntaxHighlight lang="nix">
vim_configurable.customize {
  vimrcConfig = {
    customRC = ''
      let g:LanguageClient_serverCommands = {
        \ 'python': ['pyls']
        \ }
    '';
    packages.myVimPackage = with pkgs.vimPlugins; {
      start = [ LanguageClient-neovim ];
    }
};
</syntaxHighlight>
 
Then put the following expression in <code>environment.systemPackages</code> or in the home-manager package list,
to install python-language-server:
<syntaxHighlight  lang="nix">
(python3.withPackages(ps: [
  ps.python-language-server
  # the following plugins are optional, they provide type checking and optional import sorting
  ps.pyls-mypy ps.pyls-isort
]))
</syntaxHighlight>


=== Real life examples ===
=== Real life examples ===