diff options
Diffstat (limited to 'home')
-rw-r--r-- | home/neovim/completion.nix | 7 | ||||
-rw-r--r-- | home/neovim/default.nix | 6 | ||||
-rw-r--r-- | home/neovim/init.vim | 4 | ||||
-rw-r--r-- | home/neovim/plugins.nix | 32 |
4 files changed, 34 insertions, 15 deletions
diff --git a/home/neovim/completion.nix b/home/neovim/completion.nix index 70d6e1a..904491d 100644 --- a/home/neovim/completion.nix +++ b/home/neovim/completion.nix @@ -1,9 +1,5 @@ # This module sets up auto completion for Neovim. -{ - pkgs, - lib, - ... -}: { +{pkgs, ...}: { programs.neovim.plugins = with pkgs.vimPlugins; [ # This is the actual completion engine. { @@ -47,5 +43,6 @@ cmp-calc cmp-buffer cmp-path + cmp-conjure ]; } diff --git a/home/neovim/default.nix b/home/neovim/default.nix index 4d49854..1739047 100644 --- a/home/neovim/default.nix +++ b/home/neovim/default.nix @@ -1,9 +1,5 @@ # This file contains the HM configuration options for Neovim. -{ - pkgs, - lib, - ... -}: { +{...}: { imports = [ ./lsp.nix ./filetype.nix diff --git a/home/neovim/init.vim b/home/neovim/init.vim index c73d801..029c5f9 100644 --- a/home/neovim/init.vim +++ b/home/neovim/init.vim @@ -30,6 +30,9 @@ syn on " Persistent undo set undofile +" Give me some thinking time, jesus! +set timeout timeoutlen=2000 + " Line numbers set number relativenumber @@ -56,6 +59,7 @@ set nowrap """"""""""""""""""""""""""" let g:mapleader = "\<space>" +let g:maplocalleader = "\<space>" " Some keys are hard to press with the Danish layout. Luckily, we have some " spare keys! Note that ctrl and esc are swapped at the OS level. diff --git a/home/neovim/plugins.nix b/home/neovim/plugins.nix index 1e0a707..2610141 100644 --- a/home/neovim/plugins.nix +++ b/home/neovim/plugins.nix @@ -1,9 +1,6 @@ # This module sets up and configures various miscellaneous plugins. -{ - pkgs, - lib, - ... -}: { +# TODO: I fear this file will become the utils.lua of my Neovim configuration. Remove it! +{pkgs, ...}: { programs.neovim.plugins = [ { plugin = pkgs.vimPlugins.vim-localvimrc; @@ -25,5 +22,30 @@ map T <Plug>Sneak_T ''; } + { + # Add interactive repl-like environment. + # See also the addition of cmp-conjure in `completion.nix`. + # See also the addition of clojure in `dev-utils/default.nix`. + plugin = pkgs.vimPlugins.conjure; + type = "lua"; + config = '' + -- Create a command to launch NRepl for Clojure support. + -- See: https://github.com/Olical/conjure/wiki/Quick-start:-Clojure + vim.api.nvim_create_user_command("NRepl", function() + local id = vim.fn.jobstart({ + "${pkgs.clojure}/bin/clj", + "-Sdeps", + '{:deps {nrepl/nrepl {:mvn/version "1.0.0"} cider/cider-nrepl {:mvn/version "0.40.0"}}}', + "--main", + "nrepl.cmdline", + "--middleware", + '["cider.nrepl/cider-middleware"]', + "--interactive", + }) + end, { + desc = "Starts an NRepl session in the current directory (for use w/ conjure).", + }) + ''; + } ]; } |