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