Move some things out of common.lua for better use on non-nix machines

This commit is contained in:
Evie Litherland-Smith 2023-06-03 07:58:27 +01:00
parent 64cf5b8ce6
commit 1fca774106

View file

@ -1,7 +1,6 @@
vim.g.mapleader = " " vim.g.mapleader = " "
vim.g.maplocalleader = "," vim.g.maplocalleader = ","
vim.opt.termguicolors = true vim.opt.termguicolors = true
require "ui.fillchars"
-- bootstrap lazy.nvim -- bootstrap lazy.nvim
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
@ -16,33 +15,8 @@ if not vim.loop.fs_stat(lazypath) then
} }
end end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
require("lazy").setup {
spec = "plugins",
install = { colorscheme = { "tokyonight" } },
ui = {
border = "rounded",
icons = { lazy = " " },
},
diff = { cmd = "diffview.nvim" },
checker = { enabled = true, frequency = 3600 },
performance = {
rtp = {
disabled_plugins = {
"gzip",
"matchit",
"matchparen",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
}
-- Set vim options -- Set vim options
vim.cmd [[colorscheme tokyonight]]
vim.opt.shiftwidth = 4 vim.opt.shiftwidth = 4
vim.opt.expandtab = true vim.opt.expandtab = true
vim.opt.number = true vim.opt.number = true
@ -53,16 +27,6 @@ vim.opt.splitbelow = true
vim.opt.splitright = true vim.opt.splitright = true
vim.opt.foldlevelstart = 99 vim.opt.foldlevelstart = 99
-- Global
vim.g.loaded_perl_provider = 0
-- Common keymaps -- Common keymaps
vim.keymap.set("i", "jk", "<esc>") vim.keymap.set("i", "jk", "<esc>")
vim.keymap.set("n", "<leader>l", "<cmd>Lazy<CR>") vim.keymap.set("n", "<leader>l", "<cmd>Lazy<CR>")
-- GUI settings
if vim.g.neovide then
require "ui.neovide"
elseif vim.g.vscode then
require "ui.vscode"
end