Update all kinds of plugin, wrong configuration, etc.

This commit is contained in:
David Holland 2022-09-06 16:27:18 +02:00
parent f34eee4399
commit 424a3a58af
Signed by: DustVoice
GPG Key ID: 47068995A14EDCA9
5 changed files with 106 additions and 22 deletions

View File

@ -4,7 +4,7 @@
vim.keymap.set('n', '<leader>cd', ':cd %:p:h<CR>', { noremap = true, silent = true })
vim.keymap.set('n', '<leader>lcd', ':lcd %:p:h<CR>', { noremap = true, silent = true })
vim.keymap.set('t', '<Esc>', '<C-\\><C-n>', { noremap = true })
vim.keymap.set('t', '<C-w><Esc>', '<C-\\><C-n>', { noremap = true })
vim.keymap.set('n', '<leader>+', '<C-W>+', { noremap = true })
vim.keymap.set('n', '<leader>-', '<C-W>-', { noremap = true })

View File

@ -1,9 +1,9 @@
-- vim.cmd([[
-- augroup packer_user_config
-- autocmd!
-- autocmd BufWritePost plugins.lua source <afile> | PackerCompile
-- augroup end
-- ]])
vim.cmd([[
augroup packer_user_config
autocmd!
autocmd BufWritePost plugins.lua source <afile> | PackerCompile
augroup end
]])
return require('packer').startup(function(use)
-- Packer can manage itself
@ -135,6 +135,10 @@ return require('packer').startup(function(use)
use 'ARM9/arm-syntax-vim'
end
if vim.g.use_gas == true then
use 'Shirk/vim-gas'
end
if vim.g.use_asm_indent == true then
use 'philj56/vim-asm-indent'
end
@ -190,6 +194,7 @@ return require('packer').startup(function(use)
}
}
}
lspconfig.rust_analyzer.setup {}
end
},
}
@ -271,6 +276,13 @@ return require('packer').startup(function(use)
end
-- ===
-- ===
-- Fish
-- ===
if vim.g.use_fish == true then
use 'nickeb96/fish.vim'
end
-- ===
-- Special functionality
-- ===
@ -294,10 +306,27 @@ return require('packer').startup(function(use)
-- ===
-- Colorscheme
-- ===
use {'dracula/vim', as = 'dracula'}
use {'catppuccin/nvim', as = 'catppuccin'}
use {
"themercorp/themer.lua",
config = function()
require("themer").setup({
colorscheme = "dracula",
styles = {
["function"] = { style = 'italic' },
functionbuiltin = { style = 'italic' },
variable = { style = 'italic' },
variableBuiltIn = { style = 'italic' },
parameter = { style = 'italic' },
},
})
end
}
if vim.g.use_alt_colorschemes == true then
use {'dracula/vim', as = 'dracula.vim'}
use {'Mofiqul/dracula.nvim', as = 'dracula.nvim'}
use {'catppuccin/nvim', as = 'catppuccin.nvim'}
use 'ajmwagar/vim-deus'
use 'chriskempson/base16-vim'
end

View File

@ -45,5 +45,6 @@ end
-- ===
-- Colorscheme
-- ===
vim.cmd('colorscheme dracula')
-- vim.cmd('colorscheme dracula')
-- Themer takes care of this
-- ===

View File

@ -1,9 +1,19 @@
if string.match(vim.opt.shell["_value"], 'fish$') then
if vim.fn.executable('zsh') then
vim.opt.shell = "zsh"
elseif vim.fn.executable('bash') then
vim.opt.shell = "bash"
else
vim.opt.shell = "sh"
end
end
HOME = os.getenv("HOME")
vim.opt.compatible = false
-- ===
-- Platform specific settings. Configure your platform in iniinitlua, in the platform dir.
-- Platform specific settings. Configure your platform in init.lua, in the platform dir.
-- ===
if vim.g.platform == "linux" then
-- vim.cmd('autocmd VimLeave * set guicursor=a:ver35-blinkon0')
@ -24,13 +34,13 @@ if vim.g.platform == "linux" then
else
vim.opt.termguicolors = false
vim.cmd('autocmd ColorScheme dracula hi Visual cterm=reverse')
vim.cmd('autocmd ColorScheme themer_dracula hi Visual cterm=reverse')
end
elseif vim.g.platform == "xterm" then
vim.opt.termguicolors = false
vim.opt.guicursor = ""
vim.opt.t_Co = ""
vim.cmd('autocmd ColorScheme dracula hi Visual cterm=reverse')
vim.cmd('autocmd ColorScheme themer_dracula hi Visual cterm=reverse')
else
vim.opt.termguicolors = true
end
@ -38,6 +48,15 @@ end
vim.env.NVIM_TUI_ENABLE_TRUE_COLOR = 1
-- ===
-- ===
-- Deacivate termguicolors on entering the terminal to display the colors correctly
-- ===
vim.cmd([[
autocmd TermEnter * set notermguicolors
autocmd TermLeave * set termguicolors
]])
-- ===
-- ===
-- Choose the mapleaders, in my case the spacebar.
-- ===
@ -102,7 +121,7 @@ local config = {
use_airline = false,
use_alt_colorschemes = true,
use_arm_syntax = false,
use_arm_syntax = true,
use_asciidoctor = true,
use_asm_indent = true,
use_async = true,
@ -113,9 +132,11 @@ local config = {
use_coc = false,
use_comfortable_motion = false,
use_cpp = true,
use_fish = true,
use_font = false,
use_fswitch = true,
use_fugitive = true,
use_gas = true,
use_indentguides = false,
use_javacomplete = false,
use_latexmk = false,
@ -141,7 +162,7 @@ local config = {
}
for key, value in pairs(config) do
if not vim.g[key] then
if vim.g[key] == nil then
vim.g[key] = value
end
end
@ -167,13 +188,22 @@ end
-- ===
-- arm-assembly
-- ===
vim.cmd([[
function! SetupArm()
execute('set filetype=arm')
endfunction
au BufNewFile,BufRead *.s,*.S call SetupArm() " arm = armv6/7
]])
-- vim.cmd([[
-- function! SetupArm()
-- execute('set filetype=arm')
-- endfunction
--
-- au BufNewFile,BufRead *.s,*.S call SetupArm() " arm = armv6/7
-- ]])
--
-- Use
-- @ vim:ft=armv5 at top/bottom of assembly file instead
-- ===
-- GNU assembly, use
-- /* vim: ft=gas :
-- */
--
-- at end of file
-- ===
-- ===

View File

@ -130,3 +130,27 @@ if vim.g.use_cpp == true then
]])
end
-- ===
-- ===
-- Function to show current syntax highlight groups
-- ===
vim.cmd([[
function! SynGroup()
let l:s = synID(line('.'), col('.'), 1)
echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name')
endfunction
command! SynGroup :call SynGroup()
function! SynStack()
if !exists("*synstack")
return
endif
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
endfunction
command! SynStack :call SynStack()
]])
-- ===