mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-12-22 08:17:35 +00:00
Remove unecessary locals
This commit is contained in:
parent
62f51ed97c
commit
f6621cc031
@ -1,10 +1,8 @@
|
||||
local o = vim.o
|
||||
local g = vim.g
|
||||
local utils = require("utils")
|
||||
|
||||
-- Set backup on
|
||||
o.backup = true
|
||||
o.backupdir = table.concat({
|
||||
vim.o.backup = true
|
||||
vim.o.backupdir = table.concat({
|
||||
(vim.env.XDG_DATA_HOME or "") .. "/nvim/backup//",
|
||||
(vim.env.XDG_CONFIG_HOME or "") .. "/nvim/backup//",
|
||||
"~/.config/nvim/backup//",
|
||||
@ -12,31 +10,31 @@ o.backupdir = table.concat({
|
||||
}, ",")
|
||||
|
||||
-- Set leader to space
|
||||
g.mapleader = " "
|
||||
vim.g.mapleader = " "
|
||||
|
||||
-- Get terminal colors and unicode working, hopefully
|
||||
vim.cmd([[
|
||||
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
||||
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
||||
]])
|
||||
o.termguicolors = true
|
||||
-- o.term = "xterm-256color"
|
||||
vim.o.termguicolors = true
|
||||
-- vim.o.term = "xterm-256color"
|
||||
|
||||
o.number = true
|
||||
o.expandtab = true
|
||||
o.tabstop = 4
|
||||
o.softtabstop = 4
|
||||
o.shiftwidth = 4
|
||||
o.virtualedit = "onemore"
|
||||
o.scrolljump = 5
|
||||
o.scrolloff = 3
|
||||
-- o.backspace = "2"
|
||||
vim.o.number = true
|
||||
vim.o.expandtab = true
|
||||
vim.o.tabstop = 4
|
||||
vim.o.softtabstop = 4
|
||||
vim.o.shiftwidth = 4
|
||||
vim.o.virtualedit = "onemore"
|
||||
vim.o.scrolljump = 5
|
||||
vim.o.scrolloff = 3
|
||||
-- vim.o.backspace = "2"
|
||||
|
||||
-- o.mousehide = true
|
||||
o.mouse = "a"
|
||||
-- vim.o.mousehide = true
|
||||
vim.o.mouse = "a"
|
||||
|
||||
-- Autocomplete options
|
||||
o.completeopt = "menuone,noinsert,noselect,preview"
|
||||
vim.o.completeopt = "menuone,noinsert,noselect,preview"
|
||||
vim.api.nvim_create_autocmd({ "CompleteDone" }, {
|
||||
pattern = "*",
|
||||
command = "if pumvisible() == 0 | pclose | endif",
|
||||
@ -44,8 +42,8 @@ vim.api.nvim_create_autocmd({ "CompleteDone" }, {
|
||||
})
|
||||
|
||||
local has = vim.fn.has
|
||||
g.is_mac = (has("mac") or has("macunix") or has("gui_macvim") or vim.fn.system("uname"):find("^darwin") ~= nil)
|
||||
g.is_gui = vim.fn.exists("g:neovide")
|
||||
vim.g.is_mac = (has("mac") or has("macunix") or has("gui_macvim") or vim.fn.system("uname"):find("^darwin") ~= nil)
|
||||
vim.g.is_gui = vim.fn.exists("g:neovide")
|
||||
|
||||
-- Require some local values
|
||||
utils.require_with_local("variables")
|
||||
|
@ -2,20 +2,18 @@ if vim.fn.has("nvim-0.9.0") ~= 1 then
|
||||
print("ERROR: Requires nvim >= 0.9.0")
|
||||
end
|
||||
|
||||
local o = vim.o
|
||||
|
||||
-- Helpers
|
||||
require("_settings")
|
||||
require("_bindings")
|
||||
|
||||
-- Use better grep programs
|
||||
if vim.fn.executable("rg") == 1 then
|
||||
o.grepprg = "rg --vimgrep --no-heading --color=never"
|
||||
o.grepformat = "%f:%l:%c:%m,%f:%l:%m"
|
||||
vim.o.grepprg = "rg --vimgrep --no-heading --color=never"
|
||||
vim.o.grepformat = "%f:%l:%c:%m,%f:%l:%m"
|
||||
elseif vim.fn.executable("ag") == 1 then
|
||||
o.grepprg = "ag --vimgrep --nogroup --nocolor"
|
||||
vim.o.grepprg = "ag --vimgrep --nogroup --nocolor"
|
||||
elseif vim.fn.executable("ack") == 1 then
|
||||
o.grepprg = "ack"
|
||||
vim.o.grepprg = "ack"
|
||||
end
|
||||
|
||||
-- Disable polyglot for langauges I've added special support for
|
||||
|
Loading…
Reference in New Issue
Block a user