Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { pkgs ? import <nixpkgs> {}, lib ? pkgs.lib, ... }:
- with pkgs;
- let
- pythonBundle = python3Full.withPackages(ps: with ps; [
- python-language-server
- pyls-mypy pyls-isort pyls-black
- # add your python libraries here
- ]);
- myvim = (vim_configurable.customize {
- # This is taken from the NixOS Wiki
- # Add and modify your config here
- # you can also use lib.fileContents to load from an existing file
- name = "vim-with-plugins";
- vimrcConfig = {
- customRC = ''
- let g:LanguageClient_serverCommands = {
- \ 'python': ['pyls']
- \ }
- nnoremap <F5> :call LanguageClient_contextMenu()<CR>
- nnoremap <silent> gh :call LanguageClient_textDocument_hover()<CR>
- nnoremap <silent> gd :call LanguageClient_textDocument_definition()<CR>
- nnoremap <silent> gr :call LanguageClient_textDocument_references()<CR>
- nnoremap <silent> gs :call LanguageClient_textDocument_documentSymbol()<CR>
- nnoremap <silent> <F2> :call LanguageClient_textDocument_rename()<CR>
- nnoremap <silent> gf :call LanguageClient_textDocument_formatting()<CR>
- '';
- packages.myVimPackage = with pkgs.vimPlugins; {
- start = [ LanguageClient-neovim ];
- };
- };
- }); in myvim.overrideAttrs (oldAttrs: rec { python = pythonBundle; })
Advertisement
Add Comment
Please, Sign In to add comment