Merge branch 'lazy_config' into 'master'

Lazy config

See merge request schnick/nvim!1
This commit is contained in:
Schnick 2024-01-08 12:06:10 +00:00
commit 20582f02e3
21 changed files with 461 additions and 9016 deletions

View File

@ -75,8 +75,8 @@ else:
endsnippet endsnippet
snippet for "For loop" b snippet for "For loop" b
for ${1:i} in ${2:1}..${3:10} loop for ${1:i} ${2:in ${3:1}..${4:10}} loop
$4 $5
end loop;$0 end loop;$0
endsnippet endsnippet

View File

@ -1,11 +1,11 @@
snippet fun "New function" snippet fun "New function"
function ${1:Name} ($2) function ${1:Name} ($2)
$3 $3
end; end;
$0 $0
endsnippet endsnippet
snippet while "while-loop" snippet while "while-loop"
while (${1:true}) while (${1:true})
do do
$1 $1
@ -13,7 +13,7 @@ end;
$0 $0
endsnippet endsnippet
snippet for "for loop" snippet for "for loop"
for ${1:i = 0}, ${2:target}, ${3:1} for ${1:i = 0}, ${2:target}, ${3:1}
do do
$4 $4
@ -21,14 +21,14 @@ end;
$0 $0
endsnippet endsnippet
snippet repeat "repeat until loop" snippet repeat "repeat until loop"
repeat repeat
$2 $2
until (${1:Condition}); until (${1:Condition});
$0 $0
endsnippet endsnippet
snippet ifthen "normal if clause" snippet ifthen "normal if clause"
if (${1:Condition}) if (${1:Condition})
then then
$2 $2
@ -36,7 +36,7 @@ end;
$0 $0
endsnippet endsnippet
snippet ifelse "if and else clause" snippet ifelse "if and else clause"
if (${1:Condition}) if (${1:Condition})
then then
$1 $1
@ -52,3 +52,10 @@ snippet "= fun" "Assign a function" rA
end;$0 end;$0
endsnippet endsnippet
snippet docstring "Document string" b
-- Filename: `!p snip.rv = fn`
-- Author: ${1:Yannick Reiß}
-- Copyright: ${2:MIT-License}
-- Description: ${3:Funny lua script}
$0
endsnippet

View File

@ -446,12 +446,13 @@ snippet != "not equal" iA
\\neq $0 \\neq $0
endsnippet endsnippet
snippet "@(\w)" "insert greek letter" irA snippet "@(\w)" "insert greek letter" ir
\\`!p letters = {'a': 'alpha', 'A': 'Alpha', 'b': 'beta', 'B': 'Beta', 'g': 'gamma', 'G': 'Gamma', 'e': 'epsilon', 'E': 'Epsilon', 'o': 'omega', 'O': 'Omega', 'm': 'mu', 'M': 'Mu', 'n': 'eta', 'd': 'delta', 'D': 'Delta', 'N': 'Eta', 'v': 'varphi', 'V': 'Varphi', 'P': 'partial', 'p': 'pi', 'r': 'rho', 'S': 'Sigma', 's': 'sigma'} `!p letters = {'a': 'alpha', 'A': 'Alpha', 'b': 'beta', 'B': 'Beta', 'g': 'gamma', 'G': 'Gamma', 'e': 'epsilon', 'E': 'Epsilon', 'o': 'omega', 'O': 'Omega', 'm': 'mu', 'M': 'Mu', 'n': 'eta', 'd': 'delta', 'D': 'Delta', 'N': 'Eta', 'v': 'varphi', 'V': 'Varphi', 'P': 'partial', 'p': 'pi', 'r': 'rho', 'S': 'Sigma', 's': 'sigma'}
try: try:
snip.rv = letters[ match.group(1) ] snip.rv = "\\" + letters[ match.group(1) ]
except KeyError: except KeyError:
snip.rv = "UNDEFINED"` snip.rv = "!!UNDEFINED"`
endsnippet endsnippet
snippet _- "Escape _ easier" iA snippet _- "Escape _ easier" iA

201
init.lua
View File

@ -1,182 +1,27 @@
-- vim.cmd('source viml/init.vim')
-- Basic setup configuration -- Basic setup configuration
vim.cmd([[ vim.cmd("source ~/.config/nvim/viml/vanilla.vim")
set nocompatible require("vanilla")
filetype on
filetype plugin on
syntax on
]])
vim.opt.number = true
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.showmatch = true
vim.opt.cursorline = true
vim.opt.hlsearch = true
vim.opt.encoding = "UTF-8"
vim.g.tex_flavor = "latex"
vim.opt.conceallevel = 2
vim.opt.guifont = "DroidSansMono Nerd Font 11"
-- set color scheme -- Lazy plugin setup
vim.opt.termguicolors = true local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
vim.cmd([[ if not vim.loop.fs_stat(lazypath) then
let g:vim_monokai_tasty_italic = 1 vim.fn.system({
colorscheme vim-monokai-tasty "git",
]]) "clone",
"--filter=blob:none",
require("plugins") "https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
-- UltiSnipsConfig lazypath,
vim.g.UltiSnipsExpandTrigger = "<tab>" })
vim.g.UltiSnipsJumpForwardTrigger = "<c-l>"
vim.g.UltiSnipsJumpBackwardTrigger = "<c-h>"
vim.g.UltiSnipsEditSplit = "vertical"
vim.g.UltiSnipsSnippetDirectories = { "~/.config/nvim/UltiSnips" }
-- indentLine config
vim.g.indentLine_char = ""
-- NERDTree Config
vim.g.NERDTreeShowHidden = 1
-- Vim Lexima
vim.g.lexima_enable_basic_rules = 1
vim.g.lexima_enable_newline_rules = 1
-- Highlight undo options
require("highlight-undo").setup({
duration = 1000,
undo = {
hlgroup = "HighlightUndo",
mode = "n",
lhs = "u",
map = "undo",
opts = {},
},
redo = {
hlgroup = "HighlightUndo",
mode = "n",
lhs = "<C-r>",
map = "redo",
opts = {},
},
highlight_for_count = true,
})
-- Nvim Formatter
-- Utilities for creating configurations
local util = require("formatter.util")
-- Provides the Format, FormatWrite, FormatLock, and FormatWriteLock commands
require("formatter").setup({
-- Enable or disable logging
logging = true,
-- Set the log level
log_level = vim.log.levels.WARN,
-- All formatter configurations are opt-in
filetype = {
-- Formatter configurations for filetype "lua" go here
-- and will be executed in order
lua = {
-- "formatter.filetypes.lua" defines default configurations for the
-- "lua" filetype
require("formatter.filetypes.lua").stylua,
-- You can also define your own configuration
function()
-- Supports conditional formatting
if util.get_current_buffer_file_name() == "special.lua" then
return nil
end
-- Full specification of configurations is down below and in Vim help
-- files
return {
exe = "stylua",
args = {
"--search-parent-directories",
"--stdin-filepath",
util.escape_path(util.get_current_buffer_file_path()),
"--",
"-",
},
stdin = true,
}
end,
},
-- Use the special "*" filetype for defining formatter configurations on
-- any filetype
["*"] = {
-- "formatter.filetypes.any" defines default configurations for any
-- filetype
require("formatter.filetypes.any").remove_trailing_whitespace,
},
},
})
-- Treesitter config
local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = { "python", "c", "cpp", "lua", "make", "markdown" },
highlight = {
enable = true,
},
indent = {
enable = true,
},
rainbow = {
enable = true,
-- disable = {"langtodisable"},
extended_mode = true,
max_file_lines = 50000,
-- colors = {}, -- hex strings
-- termcolors = {}, -- color names
},
})
-- Let Treesitter fold with <zo> and <zc>, but keeps buffers unfolded on enter
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
vim.opt.foldenable = false
-- Mason setup
require("mason").setup(require("mason").setup({
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = "",
},
},
}))
require("mason-lspconfig").setup({
-- ensure_installed = { "clangd", "cmake", "jdtls", "texlab", "pylsp" },
})
require("mason-lspconfig").setup_handlers({
function(clangd)
require("lspconfig")[clangd].setup({})
end,
["als"] = function()
require("lspconfig").als.setup({
settings = {
ada = {
projectFile = "default.gpr",
},
},
})
end,
})
require("code-completion")
-- neovide configuration
if vim.g.neovide then
vim.o.guifont = "DroidSansMono Nerd Font:8"
vim.g.neovide_scale_factor = 1.0
end end
vim.opt.rtp:prepend(lazypath)
vim.cmd("source ~/.config/nvim/viml/legacyconf.vim") require("lazy").setup("plugins")
require("plugconfig")
require("confformat")
vim.cmd("source ~/.config/nvim/viml/plugconfig.vim")
local plugtestbench = require("plugbench")

View File

@ -1,51 +0,0 @@
let SessionLoad = 1
let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1
let v:this_session=expand("<sfile>:p")
silent only
silent tabonly
cd ~/.config/nvim/viml
if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''
let s:wipebuf = bufnr('%')
endif
let s:shortmess_save = &shortmess
if &shortmess =~ 'A'
set shortmess=aoOA
else
set shortmess=aoO
endif
badd +1 legacyconf.vim
argglobal
%argdel
$argadd legacyconf.vim
edit legacyconf.vim
argglobal
setlocal fdm=expr
setlocal fde=nvim_treesitter#foldexpr()
setlocal fmr={{{,}}}
setlocal fdi=#
setlocal fdl=0
setlocal fml=1
setlocal fdn=20
setlocal nofen
let s:l = 1 - ((0 * winheight(0) + 19) / 38)
if s:l < 1 | let s:l = 1 | endif
keepjumps exe s:l
normal! zt
keepjumps 1
normal! 0
tabnext 1
if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal'
silent exe 'bwipe ' . s:wipebuf
endif
unlet! s:wipebuf
set winheight=1 winwidth=20
let &shortmess = s:shortmess_save
let s:sx = expand("<sfile>:p:r")."x.vim"
if filereadable(s:sx)
exe "source " . fnameescape(s:sx)
endif
let &g:so = s:so_save | let &g:siso = s:siso_save
set hlsearch
doautoall SessionLoadPost
unlet SessionLoad
" vim: set ft=vim :

View File

@ -54,7 +54,7 @@ cmp.setup({
{ name = "calc" }, { name = "calc" },
{ name = "lua-latex-symbols", option = { cache = true } }, { name = "lua-latex-symbols", option = { cache = true } },
-- { name = "spell", option = { keep_all_entries = false }, keyword_length = 2 }, -- { name = "spell", option = { keep_all_entries = false }, keyword_length = 2 },
{ name = "fuzzy_buffer", keyword_length = 4 }, -- { name = "fuzzy_buffer", keyword_length = 4 },
}), }),
-- add formatting of the different sources -- add formatting of the different sources

56
lua/confformat.lua Normal file
View File

@ -0,0 +1,56 @@
-- Utilities for creating configurations
local util = require("formatter.util")
-- Provides the Format, FormatWrite, FormatLock, and FormatWriteLock commands
require("formatter").setup({
-- Enable or disable logging
logging = true,
-- Set the log level
log_level = vim.log.levels.WARN,
-- All formatter configurations are opt-in
filetype = {
-- Formatter configurations for filetype "lua" go here
-- and will be executed in order
lua = {
-- "formatter.filetypes.lua" defines default configurations for the
-- "lua" filetype
require("formatter.filetypes.lua").stylua,
},
c = {
require("formatter.filetypes.c").astyle,
},
cpp = {
require("formatter.filetypes.cpp").astyle,
},
html = {
require("formatter.filetypes.html").htmlbeautifier,
},
latex = {
require("formatter.filetypes.latex").latexindent,
},
markdown = {
require("formatter.filetypes.markdown").prettier,
},
tex = {
require("formatter.filetypes.latex").latexindent,
},
rust = {
require("formatter.filetypes.rust").rustfmt,
},
-- Use the special "*" filetype for defining formatter configurations on
-- any filetype
["*"] = {
-- "formatter.filetypes.any" defines default configurations for any
-- filetype
require("formatter.filetypes.any").remove_trailing_whitespace,
},
},
})

23
lua/markdownpreview.lua Normal file
View File

@ -0,0 +1,23 @@
-- default config:
require("peek").setup({
auto_load = true, -- whether to automatically load preview when
-- entering another markdown buffer
close_on_bdelete = true, -- close preview window on buffer delete
syntax = true, -- enable syntax highlighting, affects performance
theme = "dark", -- 'dark' or 'light'
update_on_change = true,
app = "webview", -- 'webview', 'browser', string or a table of strings
-- explained below
filetype = { "markdown" }, -- list of filetypes to recognize as markdown
-- relevant if update_on_change is true
throttle_at = 200000, -- start throttling when file exceeds this
-- amount of bytes in size
throttle_time = "auto", -- minimum amount of time in milliseconds
-- that has to pass before starting new render
})

31
lua/plugbench.lua Normal file
View File

@ -0,0 +1,31 @@
local M = {}
-- Delete area in between the current and next occurrence of the current symbol under cursor.
-- use builtin functionality for opening brackets
function M.Delete_interval()
-- TODO: Think of something
end
-- resize current window using control + 7,8,9,0
function M.Resize_Current_Window(change_width, change_height)
local width = vim.api.nvim_win_get_width(0)
local height = vim.api.nvim_win_get_height(0)
if width + change_width > 5 then
vim.api.nvim_win_set_width(0, width + change_width)
end
if height + change_height > 5 then
vim.api.nvim_win_set_height(0, height + change_height)
end
end
-- Keybindings
-- 7/8 change width
-- 9/0 change height
--vim.keymap.set("n", "<C-7>", Resize_Current_Window(-1, 0))
--vim.keymap.set("n", "<C-8>", Resize_Current_Window(1, 0))
--vim.keymap.set("n", "<C-9>", Resize_Current_Window(0, -1))
--vim.keymap.set("n", "<C-0>", Resize_Current_Window(0, 1))
return M

69
lua/plugconfig.lua Normal file
View File

@ -0,0 +1,69 @@
-- UltiSnips Configuration
vim.g.UltiSnipsExpandTrigger = "<tab>"
vim.g.UltiSnipsJumpForwardTrigger = "<c-l>"
vim.g.UltiSnipsJumpBackwardTrigger = "<c-h>"
vim.g.UltiSnipsEditSplit = "vertical"
vim.g.UltiSnipsSnippetDirectories = { "~/.config/nvim/UltiSnips" }
-- NERDTree Config
vim.g.NERDTreeShowHidden = 1
-- Lexima
vim.g.lexima_enable_basic_rules = 1
vim.g.lexima_enable_newline_rules = 1
-- Telescope snippet
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<leader>ff", builtin.find_files, {})
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
vim.keymap.set("n", "<c-f>", builtin.current_buffer_fuzzy_find, {})
vim.keymap.set("n", "<leader>fh", builtin.help_tags, {})
vim.keymap.set("n", "<leader>fc", builtin.commands, {})
-- Telescope + Ultisnips
require("telescope").load_extension("ultisnips")
vim.keymap.set("n", "<leader>fs", require("telescope").extensions.ultisnips.ultisnips, {})
-- NERDTree Config
vim.g.NERDTreeDirArrowExpandable = ""
vim.g.NERDTreeDirArrowCollapsible = ""
-- Git-Blame configuration
vim.g.gitblame_message_template = " => <author> • <date> • <summary>"
vim.g.gitblame_date_format = "%r"
-- Intendation basics
require("ibl").setup()
-- Code completion
require("code-completion")
-- Mason setup
require("mason").setup(require("mason").setup({
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = "",
},
},
}))
require("mason-lspconfig").setup({
-- ensure_installed = { "clangd", "cmake", "jdtls", "texlab", "pylsp" },
})
require("mason-lspconfig").setup_handlers({
function(clangd)
require("lspconfig")[clangd].setup({})
end,
["als"] = function()
require("lspconfig").als.setup({
settings = {
ada = {
projectFile = "default.gpr",
},
},
})
end,
})

View File

@ -1,73 +1,63 @@
return require("packer").startup(function(use) return {
-- Configurations will go here soon "preservim/nerdtree",
use("wbthomason/packer.nvim") "Xuyuanp/nerdtree-git-plugin",
use("preservim/nerdtree") "SirVer/UltiSnips",
use("Xuyuanp/nerdtree-git-plugin") "tpope/vim-surround",
use("tpope/vim-surround") "vim-airline/vim-airline",
use("SirVer/ultisnips") "vim-airline/vim-airline-themes",
use("powerline/powerline") {
use("vim-airline/vim-airline")
use("vim-airline/vim-airline-themes")
use({
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
run = function() build = ":TSUpdate",
local ts_update = require("nvim-treesitter.install").update({ with_sync = true })
ts_update()
end,
})
use({ "junegunn/fzf", run = ":call fzf#install()" })
use("junegunn/fzf.vim")
use("williamboman/mason.nvim")
use("williamboman/mason-lspconfig.nvim")
use("neovim/nvim-lspconfig")
use("mfussenegger/nvim-dap")
use("f-person/git-blame.nvim")
use("mfussenegger/nvim-lint")
use("p00f/nvim-ts-rainbow")
use("cohama/lexima.vim")
use("hrsh7th/nvim-cmp")
use("hrsh7th/cmp-nvim-lsp")
use("hrsh7th/cmp-nvim-lua")
use("hrsh7th/cmp-nvim-lsp-signature-help")
use("hrsh7th/cmp-path")
use("hrsh7th/cmp-buffer")
use("hrsh7th/cmp-calc")
use("hrsh7th/cmp-cmdline")
use("dmitmel/cmp-cmdline-history")
use("amarakon/nvim-cmp-lua-latex-symbols")
use("prabirshrestha/async.vim")
use("prabirshrestha/vim-lsp")
use("nvim-tree/nvim-web-devicons")
use("mg979/vim-visual-multi")
use({ "romgrk/barbar.nvim", wants = "nvim-web-devicons" })
use({ "petertriho/cmp-git", requires = "nvim-lua/plenary.nvim" })
use("quangnguyen30192/cmp-nvim-ultisnips")
use("ryanoasis/vim-devicons")
use("mhartington/formatter.nvim")
use("tzachar/highlight-undo.nvim")
use("folke/tokyonight.nvim")
use("patstockwell/vim-monokai-tasty")
use("yannickreiss/nvim-doxyscan")
use("tpope/vim-speeddating")
use("jaredgorski/SpaceCamp")
use("projekt0n/github-nvim-theme")
use({
"nvimdev/dashboard-nvim",
event = "VimEnter",
config = function() config = function()
require("dashboard").setup({ local configs = require("nvim-treesitter.configs")
theme = "hyper", -- alt = 'doom'
config = { configs.setup({
week_header = { -- ensure_installed = { "c", "vim", "ada", "html", "python" },
enable = true, sync_install = false,
}, highlight = { enable = true },
}, indent = { enable = true },
}) })
end, end,
requires = { "nvim-tree/nvim-web-devicons" }, },
}) "f-person/git-blame.nvim",
use("hiroakis/cyberspace.vim") -- I'm feeling cyber "p00f/nvim-ts-rainbow",
use("f3fora/cmp-spell") "cohama/lexima.vim",
use({ "nvim-telescope/telescope-fzf-native.nvim", run = "make" }) "ryanoasis/vim-devicons",
use({ "tzachar/cmp-fuzzy-buffer", requires = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" } }) {
end) "nvim-telescope/telescope.nvim",
tag = "0.1.5",
dependencies = { "nvim-lua/plenary.nvim" },
},
"fhill2/telescope-ultisnips.nvim",
"hiroakis/cyberspace.vim",
"tpope/vim-speeddating",
"yannickreiss/nvim-doxyscan",
"nvim-tree/nvim-web-devicons",
{ "romgrk/barbar.nvim", wants = "nvim-web-devicons" },
{ "lukas-reineke/indent-blankline.nvim", main = "ibl", opts = {} },
"dstein64/vim-startuptime",
"folke/tokyonight.nvim",
"patstockwell/vim-monokai-tasty",
"hrsh7th/nvim-cmp",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-nvim-lua",
"hrsh7th/cmp-nvim-lsp-signature-help",
"hrsh7th/cmp-path",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-calc",
"hrsh7th/cmp-cmdline",
"dmitmel/cmp-cmdline-history",
"amarakon/nvim-cmp-lua-latex-symbols",
"f3fora/cmp-spell",
{ "petertriho/cmp-git", requires = "nvim-lua/plenary.nvim" },
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
"neovim/nvim-lspconfig",
"mfussenegger/nvim-dap",
"mhartington/formatter.nvim",
"mg979/vim-visual-multi",
{ "nvim-telescope/telescope-fzf-native.nvim", run = "make" },
{ "tzachar/fuzzy.nvim", requires = { "nvim-telescope/telescope-fzf-native.nvim" } },
{ "tzachar/cmp-fuzzy-buffer", requires = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" } },
"quangnguyen30192/cmp-nvim-ultisnips",
}

15
lua/vanilla.lua Normal file
View File

@ -0,0 +1,15 @@
vim.opt.number = true
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.showmatch = true
vim.opt.cursorline = true
vim.opt.hlsearch = true
vim.opt.encoding = "UTF-8"
vim.g.tex_flavor = "latex"
vim.opt.conceallevel = 2
vim.opt.guifont = "DroidSansMono Nerd Font 11"
vim.g.mapleader = ","
-- set color scheme
vim.opt.termguicolors = true

View File

@ -295,3 +295,42 @@ Kologromov
frame frame
Sampling Sampling
empty empty
Kindprozesse
Kernelaufrufe
root
sigpause
Signalhandler
Nachrichtenorientierte
send
receive
duty
cycles
Skalier
mHz
Cycle
Lookup
rodata
text
data
bss
Heap
pop
push
Overflow
LIFO
free
malloc
Relokationsproblem
Heaps
Relokation
Mikrocontrollersystemen
Debugging
Metaspeicher
Soundcard
ressourcenbeschränkten
Nexys
Mono
Zynq
Z7
Arty
Repository

Binary file not shown.

View File

@ -127,3 +127,45 @@ intel
Calma's Calma's
nsf nsf
Vec Vec
plugconfig
folke
viml
config
confformat
plugbench
jedec
Graf
HoP
Hearttron
lexed
malloc
nicklang
NL
Rhein
Wiesbaden
Crysler
TT
ssm
automata
IEEEtran
de
hs
yreis001
CET
M4
on
evaluator
basisc
untrusted
VHDL
floorplanning
toolchains
OpenLane
floorplanner
combinational
pinetime
nRF52832
nordic
openROAD
gcc
linux

Binary file not shown.

View File

@ -1,6 +0,0 @@
function Common()
endfunction
" load common macros for all Filetypes
autocmd BufEnter * :call Common()

47
viml/plugconfig.vim Normal file
View File

@ -0,0 +1,47 @@
" NERDTree remap
nmap <C-e> :NERDTreeToggle<CR>
" Autoformat on save
augroup FormatAutogroup
autocmd!
autocmd BufWritePost * FormatWrite
augroup END
nnoremap <silent> <C-0> <Cmd>BufferNext<CR>
" update function and call
function Update_Sys()
Lazy sync
TSUpdate
endfunction
nnoremap <M-u> :call Update_Sys()<CR>
" Call build function
function! Build()
let l:filetype = &filetype
if l:filetype == 'c' || l:filetype == 'cpp' || l:filetype == 'h' || l:filetype == 'hpp'
execute '!make'
elseif l:filetype == 'py' || l:filetype == 'python'
execute '!python3 %'
elseif l:filetype == 'tex'
execute '!lualatex % < /dev/null'
elseif l:filetype == 'rs'
execute 'cargo run'
elseif l:filetype == 'S'
execute '!make'
elseif l:filetype == 'verilog'
execute '!verilator --binary %'
elseif l:filetype == 'rust'
execute '!cargo run'
elseif l:filetype == 'markdown'
execute '!okular %&'
else
echo "Unsupported file type: " . l:filetype
endif
endfunction
nnoremap <C-b> :call Build()<CR>
nnoremap <M-w> :bdelete<CR>
nnoremap <C-y> :b#<CR>

View File

@ -1,33 +0,0 @@
" PLUGINS
call plug#begin('~/.vim/plugged')
Plug 'dense-analysis/ale'
Plug 'preservim/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tpope/vim-surround'
Plug 'SirVer/ultisnips'
Plug 'vim-airline/vim-airline'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'neovim/nvim-lspconfig'
Plug 'junegunn/fzf.vim'
Plug 'Valloric/YouCompleteMe'
Plug 'williamboman/mason.nvim'
Plug 'williamboman/mason-lspconfig.nvim'
Plug 'neovim/nvim-lspconfig'
Plug 'mfussenegger/nvim-dap'
Plug 'f-person/git-blame.nvim'
Plug 'mfussenegger/nvim-lint'
Plug 'lewis6991/gitsigns.nvim'
Plug 'p00f/nvim-ts-rainbow'
Plug 'cohama/lexima.vim'
Plug 'honza/vim-snippets'
Plug 'hrsh7th/nvim-cmp'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'hrsh7th/cmp-nvim-lua'
Plug 'hrsh7th/cmp-nvim-lsp-signature-help'
Plug 'hrsh7th/cmp-vsnip'
Plug 'hrsh7th/cmp-path'
Plug 'hrsh7th/cmp-buffer'
Plug 'hrsh7th/vim-vsnip'
Plug 'ryanoasis/vim-devicons'
call plug#end()

36
viml/vanilla.vim Normal file
View File

@ -0,0 +1,36 @@
set nocompatible
filetype on
filetype plugin on
syntax on
colorscheme vim-monokai-tasty
" open builtin terminal
function OpenTerm()
10 split
terminal
endfunction
nnoremap <C-t> :call OpenTerm()<CR>
set splitright
set splitbelow
set clipboard+=unnamedplus
" set spellcheck according to Filetype
autocmd VimEnter * set spell spelllang=en_us
function Litde()
set spell spelllang=de_de
endfunction
function Liten()
set spell spelllang=en_us
endfunction
nnoremap <M-e> :call Liten()<CR>
nnoremap <M-g> :call Litde()<CR>
" Theme
nnoremap <M-+> :colo tokyonight-day<CR>
nnoremap <M--> :colo tokyonight-night<CR>

File diff suppressed because it is too large Load Diff