Skip to content

Commit

Permalink
neovim: Enable mapleader before lazy.nvim is loaded
Browse files Browse the repository at this point in the history
 refs #206
  • Loading branch information
m-b-t-n committed Jan 7, 2025
1 parent dfe745e commit 9d28ce6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions neovim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ vim.opt.nrformats = 'unsigned,bin,hex'
vim.cmd.colorscheme('desert')
vim.opt.helplang = 'ja,en'

-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"

-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
Expand All @@ -48,12 +54,6 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
end
vim.opt.rtp:prepend(lazypath)

-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"

-- Setup lazy.nvim
require("lazy").setup({
spec = {
Expand Down

0 comments on commit 9d28ce6

Please sign in to comment.