Cleanup vim for primary emacs usage

This commit is contained in:
David Holland 2023-07-15 18:52:38 +02:00
parent 2168ae0c71
commit 604189e7d6
8 changed files with 68 additions and 37 deletions

View File

@ -1,4 +0,0 @@
"Here you can define your own custom settings like
"let g:use_sound = 1
"let g:use_autocomplete = 1
"let g:use_coc = 1

15
lua/.gitignore vendored Normal file
View File

@ -0,0 +1,15 @@
/*
/*/
!/.gitignore
!/.gitattributes
!/keymaps.lua
!/plugin_options.lua
!/plugins.lua
!/post_plugins.lua
!/pre_plugins.lua
!/settings.lua
!/utilities.lua
!/custom/
!/platform/

6
lua/custom/.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
/*
/*/
!/.gitignore
!/.gitattributes
!/example.lua

6
lua/platform/.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
/*
/*/
!/.gitignore
!/.gitattributes
!/example.lua

View File

@ -4,6 +4,19 @@ vim.api.nvim_create_autocmd('BufWritePost', {
command = 'source <afile> | PackerCompile', command = 'source <afile> | PackerCompile',
}) })
local ensure_packer = function()
local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
vim.cmd [[packadd packer.nvim]]
return true
end
return false
end
local packer_bootstrap = ensure_packer()
return require('packer').startup(function(use) return require('packer').startup(function(use)
-- Packer can manage itself -- Packer can manage itself
use { use {
@ -499,4 +512,12 @@ return require('packer').startup(function(use)
use 'chriskempson/base16-vim' use 'chriskempson/base16-vim'
end end
-- === -- ===
-- ===
-- Auto :PackerSync
-- ===
-- if packer_bootstrap then
-- require('packer').sync()
-- end
-- ===
end) end)

View File

@ -2,7 +2,7 @@ HOME = os.getenv("HOME")
vim.opt.compatible = false vim.opt.compatible = false
if string.match(vim.opt.shell["_value"], 'fish$') then if string.match(vim.opt.shell["_value"], 'fish$') or string.match(vim.opt.shell["_value"], 'nu$') then
if vim.fn.executable('zsh') then if vim.fn.executable('zsh') then
vim.opt.shell = "zsh" vim.opt.shell = "zsh"
vim.g.replacement_shell = "zsh" vim.g.replacement_shell = "zsh"
@ -36,20 +36,11 @@ if vim.g.platform == "linux" then
vim.opt.termguicolors = true vim.opt.termguicolors = true
else else
vim.opt.termguicolors = false vim.opt.termguicolors = false
--vim.api.nvim_create_autocmd('ColorScheme', {
--pattern = 'themer_dracula',
--command = 'hi Visual cterm=reverse',
--})
end end
elseif vim.g.platform == "xterm" then elseif vim.g.platform == "xterm" then
vim.opt.termguicolors = false vim.opt.termguicolors = false
vim.opt.guicursor = "" vim.opt.guicursor = ""
vim.opt.t_Co = "" vim.opt.t_Co = ""
--vim.api.nvim_create_autocmd('ColorScheme', {
--pattern = 'themer_dracula',
--command = 'hi Visual cterm=reverse',
--})
else else
vim.opt.termguicolors = true vim.opt.termguicolors = true
end end
@ -115,7 +106,7 @@ vim.opt.linebreak = true
vim.opt.list = true vim.opt.list = true
vim.opt.listchars = { trail = "·", tab = "\\", extends = "", precedes = "" } vim.opt.listchars = { trail = "·", tab = "\\", extends = "", precedes = "" }
vim.opt.number = true vim.opt.number = true
vim.opt.relativenumber = true vim.opt.relativenumber = false -- set this to true, if switching is used
vim.opt.scrolloff = 1 vim.opt.scrolloff = 1
vim.opt.shiftwidth = 4 vim.opt.shiftwidth = 4
vim.opt.shortmess = "a" vim.opt.shortmess = "a"
@ -142,10 +133,10 @@ local config = {
tex_items = "", tex_items = "",
use_airline = false, use_airline = false,
use_alt_colorschemes = true, use_alt_colorschemes = false,
use_arm_syntax = true, use_arm_syntax = false,
use_asciidoctor = true, use_asciidoctor = false,
use_asm_indent = true, use_asm_indent = false,
use_async = true, use_async = true,
use_autocomplete = 0, use_autocomplete = 0,
use_bufkill = true, use_bufkill = true,
@ -153,12 +144,12 @@ local config = {
use_clang_format = false, use_clang_format = false,
use_coc = false, use_coc = false,
use_comfortable_motion = false, use_comfortable_motion = false,
use_cpp = true, use_cpp = false,
use_fish = true, use_fish = true,
use_font = false, use_font = false,
use_fswitch = true, use_fswitch = true,
use_fugitive = true, use_fugitive = true,
use_gas = true, use_gas = false,
use_indentguides = false, use_indentguides = false,
use_javacomplete = false, use_javacomplete = false,
use_latexmk = false, use_latexmk = false,
@ -242,18 +233,18 @@ vim.api.nvim_create_autocmd('FileType', {
-- === -- ===
-- Don't schow relative numbers in insert mode, but show them in normal mode -- Don't schow relative numbers in insert mode, but show them in normal mode
-- === -- ===
vim.api.nvim_create_autocmd({'BufWinEnter', 'BufEnter', 'FocusGained', 'InsertLeave' }, { -- vim.api.nvim_create_autocmd({'BufWinEnter', 'BufEnter', 'FocusGained', 'InsertLeave' }, {
pattern = '*', -- pattern = '*',
callback = function() -- callback = function()
vim.opt.relativenumber = true -- vim.opt.relativenumber = true
end, -- end,
}) -- })
vim.api.nvim_create_autocmd({'BufWinLeave', 'BufLeave', 'FocusLost', 'InsertEnter' }, { -- vim.api.nvim_create_autocmd({'BufWinLeave', 'BufLeave', 'FocusLost', 'InsertEnter' }, {
pattern = '*', -- pattern = '*',
callback = function() -- callback = function()
vim.opt.relativenumber = false -- vim.opt.relativenumber = false
end, -- end,
}) -- })
-- === -- ===
-- vim.cmd("hi LineNr guifg=#B0BEC5") -- vim.cmd("hi LineNr guifg=#B0BEC5")

@ -1 +0,0 @@
Subproject commit 4dedd3b08f8c6e3f84afbce0c23b66320cd2a8f2

View File

@ -1,3 +0,0 @@
" Possible options: windows, windows_portable, linux, termux, linux_qt, arch
" Note that linux_qt and arch have not been implemented yet
let g:platform = "windows_portable"