From 2d6479b72e06ae4cbd34562bae753deeef9e24c8 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sun, 14 Jun 2020 17:03:11 +0200 Subject: [PATCH] lnl: fix evaluation and switch to neovim --- modules/examples/lnl.nix | 84 +++++++++++++++++++++++----------------- 1 file changed, 49 insertions(+), 35 deletions(-) diff --git a/modules/examples/lnl.nix b/modules/examples/lnl.nix index c0b98164..f2948f7a 100644 --- a/modules/examples/lnl.nix +++ b/modules/examples/lnl.nix @@ -63,7 +63,8 @@ pkgs.darwin-zsh-completions ]; - services.chunkwm.enable = true; + services.yabai.enable = true; + services.yabai.package = pkgs.yabai; services.skhd.enable = true; # security.sandbox.profiles.fetch-nixpkgs-updates.closure = [ pkgs.cacert pkgs.git ]; @@ -79,12 +80,13 @@ # serviceConfig.StartInterval = 360; # }; - launchd.user.agents.letty = { - serviceConfig.Program = "${pkgs.lnl.letty}/bin/letty-blink"; - serviceConfig.WatchPaths = ["/var/mail/lnl"]; - serviceConfig.KeepAlive = false; - serviceConfig.ProcessType = "Background"; - }; + # Dotfiles. + # launchd.user.agents.letty = { + # serviceConfig.Program = "${pkgs.lnl.letty}/bin/letty-blink"; + # serviceConfig.WatchPaths = ["/var/mail/lnl"]; + # serviceConfig.KeepAlive = false; + # serviceConfig.ProcessType = "Background"; + # }; services.nix-daemon.enable = true; # services.nix-daemon.enableSocketListener = true; @@ -148,38 +150,50 @@ # programs.vim.enable = true; # programs.vim.enableSensible = true; - programs.vim.package = pkgs.vim_configurable.customize { - name = "vim"; - vimrcConfig.packages.darwin.start = with pkgs.vimPlugins; [ - vim-sensible vim-surround ReplaceWithRegister - polyglot fzfWrapper YouCompleteMe ale - ]; - vimrcConfig.packages.darwin.opt = with pkgs.vimPlugins; [ - colors-solarized - splice-vim - ]; - vimrcConfig.customRC = '' - set completeopt=menuone - set encoding=utf-8 - set hlsearch - set list - set number - set showcmd - set splitright + programs.vim.package = pkgs.neovim.override { + configure = { + packages.darwin.start = with pkgs.vimPlugins; [ + vim-sensible vim-surround ReplaceWithRegister + polyglot fzfWrapper ale deoplete-nvim + ]; - nnoremap // :nohlsearch + customRC = '' + set completeopt=menuone + set encoding=utf-8 + set hlsearch + set list + set number + set showcmd + set splitright - let mapleader = ' ' + cnoremap %% =expand('%:h') . '/' + nnoremap // :nohlsearch - " fzf - nnoremap p :FZF + let mapleader = ' ' - " vim-surround - vmap s S + " fzf + nnoremap p :FZF - " youcompleteme - let g:ycm_seed_identifiers_with_syntax = 1 - ''; + " vim-surround + vmap s S + + " ale + nnoremap d :ALEGoToDefinition + nnoremap D :ALEGoToDefinitionInVSplit + nnoremap k :ALESignature + nnoremap K :ALEHover + nnoremap [a :ALEPreviousWrap + nnoremap ]a :ALENextWrap + + " deoplete + inoremap deoplete#undo_completion() + inoremap deoplete#refresh() + inoremap deoplete#mappings#manual_complete() + inoremap pumvisible() ? "\" : "\" + + let g:deoplete#enable_at_startup = 1 + ''; + }; }; # Dotfiles. @@ -428,7 +442,7 @@ fi ''; - environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix"; + # environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix"; nixpkgs.config.allowUnfree = true;