chg: Split global configs out and use load modules in the lua way

This commit is contained in:
Sayantan Santra 2024-03-20 22:28:42 -05:00
parent ca8f9cb4db
commit 5aa7382d57
Signed by: SinTan1729
GPG key ID: EB3E68BFBA25C85F
6 changed files with 122 additions and 105 deletions

35
laptop/globals.lua Normal file
View file

@ -0,0 +1,35 @@
-- This file defines all the global config
local set = vim.opt
-- Turn on numbers
set.number = true
-- Turn off line wrapping
set.wrap = false
-- Disable cmdline from bottom
set.cmdheight = 0
-- Ignore case while searching except when the search term contains capital letters
set.ignorecase = true
set.smartcase = true
-- Use 4 spaces and properly adjust them for files using TAB
set.tabstop = 4
set.shiftwidth = 4
set.softtabstop = 4
set.expandtab = true
-- Show LSP signs in the number column
set.signcolumn = 'number'
-- Turn on spell checking
set.spell = true
-- Enable mouse support
set.mouse = 'n'
-- Enable programming dictionary
set.spelllang = { "en", "programming" }
-- Use ctrl-[hjkl] to select the active split
-- Disable unused plugins
vim.g.loaded_perl_provider = 0
vim.g.loaded_node_provider = 0
vim.g.loaded_ruby_provider = 0
-- Load UltiSnips snippets from custom-snippets directory
vim.g.UltiSnipsSnippetDirectories = { "custom-snippets", "UltiSnips" }

View file

@ -1,42 +1,10 @@
local set = vim.opt
-- Turn on numbers
set.number = true
-- Turn off line wrapping
set.wrap = false
-- Disable cmdline from bottom
set.cmdheight = 0
-- Ignore case while searching except when the search term contains capital letters
set.ignorecase = true
set.smartcase = true
-- Use 4 spaces and properly adjust them for files using TAB
set.tabstop = 4
set.shiftwidth = 4
set.softtabstop = 4
set.expandtab = true
-- Show LSP signs in the number column
set.signcolumn = 'number'
-- Turn on spell checking
set.spell = true
-- Enable mouse support
set.mouse = 'n'
-- Enable programming dictionary
set.spelllang = { "en", "programming" }
-- Use ctrl-[hjkl] to select the active split
-- Disable unused plugins
vim.g.loaded_perl_provider = 0
vim.g.loaded_node_provider = 0
vim.g.loaded_ruby_provider = 0
-- Load UltiSnips snippets from custom-snippets directory
vim.g.UltiSnipsSnippetDirectories = { "custom-snippets", "UltiSnips" }
-- Load keymaps
local keymaps = vim.fn.stdpath("config") .. "/keymaps.lua"
vim.cmd.source(keymaps)
-- Load the different config files
package.path = package.path .. ';' .. vim.fn.stdpath("config") .. "/?.lua"
-- Load global configs
require("globals")
-- Load plugins using paq-nvim
local paq = vim.fn.stdpath("config") .. "/paq.lua"
vim.cmd.source(paq)
require("paq")
-- Load keymaps
require("keymaps")

29
server/globals.lua Normal file
View file

@ -0,0 +1,29 @@
-- This file defines all the global configs
local set = vim.opt
-- Turn on numbers
set.number = true
-- Turn off line wrapping
set.wrap = false
-- Disable cmdline from bottom
set.cmdheight = 0
-- Ignore case while searching except when the search term contains capital letters
set.ignorecase = true
set.smartcase = true
-- Use 4 spaces and properly adjust them for files using TAB
set.tabstop = 4
set.shiftwidth = 4
set.softtabstop = 4
set.expandtab = true
-- Turn on spell checking
set.spell = true
-- Enable mouse support
set.mouse = 'n'
-- Enable programming dictionary
set.spelllang = { "en", "programming" }
-- Disable unused plugins
vim.g.loaded_perl_provider = 0
vim.g.loaded_node_provider = 0
vim.g.loaded_ruby_provider = 0

View file

@ -1,36 +1,10 @@
local set = vim.opt
-- Turn on numbers
set.number = true
-- Turn off line wrapping
set.wrap = false
-- Disable cmdline from bottom
set.cmdheight = 0
-- Ignore case while searching except when the search term contains capital letters
set.ignorecase = true
set.smartcase = true
-- Use 4 spaces and properly adjust them for files using TAB
set.tabstop = 4
set.shiftwidth = 4
set.softtabstop = 4
set.expandtab = true
-- Turn on spell checking
set.spell = true
-- Enable mouse support
set.mouse = 'n'
-- Enable programming dictionary
set.spelllang = { "en", "programming" }
-- Disable unused plugins
vim.g.loaded_perl_provider = 0
vim.g.loaded_node_provider = 0
vim.g.loaded_ruby_provider = 0
-- Load keymaps
local keymaps = vim.fn.stdpath("config") .. "/keymaps.lua"
vim.cmd.source(keymaps)
-- Load the different config files
package.path = package.path .. ';' .. vim.fn.stdpath("config") .. "/?.lua"
-- Load global configs
require("globals")
-- Load plugins using paq-nvim
local paq = vim.fn.stdpath("config") .. "/paq.lua"
vim.cmd.source(paq)
require("paq")
-- Load keymaps
require("keymaps")

37
vps/globals.lua Normal file
View file

@ -0,0 +1,37 @@
-- This file defines all the global configs
local set = vim.opt
-- Turn on numbers
set.number = true
-- Turn off line wrapping
set.wrap = false
-- Disable cmdline from bottom
set.cmdheight = 0
-- Ignore case while searching except when the search term contains capital letters
set.ignorecase = true
set.smartcase = true
-- Use 4 spaces and properly adjust them for files using TAB
set.tabstop = 4
set.shiftwidth = 4
set.softtabstop = 4
set.expandtab = true
-- Turn on spell checking
set.spell = true
-- Enable mouse support
set.mouse = 'n'
-- Enable programming dictionary
set.spelllang = { "en", "programming" }
-- Disable unused plugins
vim.g.loaded_perl_provider = 0
vim.g.loaded_node_provider = 0
vim.g.loaded_ruby_provider = 0
-- Load keymaps
local keymaps = vim.fn.stdpath("config") .. "/keymaps.lua"
vim.cmd.source(keymaps)
-- Load plugins using paq-nvim
local paq = vim.fn.stdpath("config") .. "/paq.lua"
vim.cmd.source(paq)

View file

@ -1,36 +1,10 @@
local set = vim.opt
-- Turn on numbers
set.number = true
-- Turn off line wrapping
set.wrap = false
-- Disable cmdline from bottom
set.cmdheight = 0
-- Ignore case while searching except when the search term contains capital letters
set.ignorecase = true
set.smartcase = true
-- Use 4 spaces and properly adjust them for files using TAB
set.tabstop = 4
set.shiftwidth = 4
set.softtabstop = 4
set.expandtab = true
-- Turn on spell checking
set.spell = true
-- Enable mouse support
set.mouse = 'n'
-- Enable programming dictionary
set.spelllang = { "en", "programming" }
-- Disable unused plugins
vim.g.loaded_perl_provider = 0
vim.g.loaded_node_provider = 0
vim.g.loaded_ruby_provider = 0
-- Load keymaps
local keymaps = vim.fn.stdpath("config") .. "/keymaps.lua"
vim.cmd.source(keymaps)
-- Load the different config files
package.path = package.path .. ';' .. vim.fn.stdpath("config") .. "/?.lua"
-- Load global configs
require("globals")
-- Load plugins using paq-nvim
local paq = vim.fn.stdpath("config") .. "/paq.lua"
vim.cmd.source(paq)
require("paq")
-- Load keymaps
require("keymaps")