Fork me on GitHub
#vim
<
2019-10-15
>
Hukka12:10:24

I can't seem to add anything to lispwords in my neovim's init.vim. Shouldn't setlocal lispwords+=foo work?

Hukka12:10:08

Everything works ok if I ran that manually after opening a file

Hukka12:10:07

(New codebase indents trys with two spaces and my nvim is creating a lot of noise in commits :/)

Hukka12:10:06

Hm, also it seems like after metadata, records are indented oddly. Any way to fix that?

(^void onOpen []
  (log/log :on-open nil))

Hukka12:10:55

Ah, metadata does not affect that. I guess it somehow considers that to be same as defs?

Hukka15:10:25

On futher analysis, this only happens when I open clj files. If I open just a new empty file, the lispwords has updated

Hukka15:10:57

I kinda solved it by moving the setting to after/ftplugin/clojure.vim, but I'm a bit confused why. I thought that ftplugin stuff is run right when the plugin is turned on in init.vim (which was before my config).

martinklepsch15:10:58

Do you use swapfiles?

dominicm15:10:24

You might without realising

dominicm15:10:29

Aren't they on by default?

dominicm15:10:44

I think I have mine relocated to ~ to avoid file watcher issues

walterl15:10:10

set directory=~/.vim/tmp          " Directory for swap/temp files
set nobackup                      " Don't create backup files
set nowb                          " Don't create write backups
set noswapfile                    " Don't create swap files

martinklepsch15:10:59

I’ve been getting annoyed by there constantly being some swapfile despite me not exiting vim in any strange way

martinklepsch15:10:42

Are there any cool hacks to enable backgrounding/foregrounding without needing to remember if there’s already a vim running in the background?

walterl16:10:22

I've been using the above settings in vim for years (and nvim for about a year), and have never had any issues. To be fair, though, I don't <C-z> vim often.

dominicm16:10:49

Backup files have saved my ass way too many times to disable them

walterl16:10:52

@dominicm In what situations have they helped you?

dominicm16:10:29

When my machine has crashed, being able to recover was helpful.

👍 1
dominicm16:10:44

Sometimes it was missing a few characters, but better than nothing.

martinklepsch17:10:00

any recommended plugins to convince vim to autoclose parens, quotes and the like?

dave17:10:10

i use https://github.com/jiangmiao/auto-pairs worth noting that it (apparently, according to a comment i left in my vimrc 😄 ) doesn't play nice with parinfer, so i disabled it for lisp:

" disable auto-pairs for lisp -- it interferes with parinfer
au Filetype lisp,scheme,clojure,lfe let b:AutoPairs = {}

dave17:10:26

vim does auto-close my parens, brackets and curly braces when i'm editing lisp code, somehow i'm thinking that vim-sexp or parinfer are doing that

dominicm17:10:08

vim-sexp does this