Fork me on GitHub
#vim
<
2021-12-09
>
zendevil.eth13:12:55

I’m trying to set global variables with fennel in nvim, but for some reason the following isn’t working:

zendevil.eth13:12:06

(set nvim.g.number true)

zendevil.eth13:12:10

How to fix this?

nbardiuk13:12:32

use vim instead of nvim like (set vim.g.number true)

zendevil.eth13:12:09

no but the rest are working

zendevil.eth13:12:25

(set nvim.g.mapleader ” “) (set nvim.g.maplocalleader “,”) (set nvim.g.updatetime 100) all work

Chase14:12:21

does number take a variable though? I don't use fennel but in my init.nvim I just have set number with nothing added. Maybe (set vim.g.number)?

Chase14:12:59

Or try (set vim.opt.number true)

zendevil.eth14:12:58

(set nvim.g.number) doesn’t work

zendevil.eth14:12:45

again all the rest are set with nvim not vim

Olical09:12:16

Are you using and plugins like "vim-better-defaults" etc? Because they tend to load late and override those settings. I'm using better-default and here's the module I use to override parts of it: https://github.com/Olical/dotfiles/blob/ea4d27b5d591978517cef3bc1fb8432e1e80a3fd/stowed/.config/nvim/fnl/dotfiles/plugin/better-default.fnl

Chase14:12:16

did the opt one work?

walterl15:12:05

Yeah, that should be it. mapleader is a global variable, whereas number is an option.