Compare commits
65 commits
50251893e1
...
c523a47eca
Author | SHA1 | Date | |
---|---|---|---|
c523a47eca | |||
acd8a470fb | |||
d3f8b0dc54 | |||
3e351df241 | |||
7c3c38903c | |||
4911861557 | |||
e39b03a277 | |||
371080ecf5 | |||
d8322bcd2c | |||
24a876d56b | |||
4e14a27a38 | |||
976bf43293 | |||
72a8e2ba4b | |||
c458b179c6 | |||
f5dba31529 | |||
a366e36878 | |||
faed9497d3 | |||
1a8cbce106 | |||
6fec85c3ea | |||
44a74d472e | |||
a81780b069 | |||
da70bbcf1d | |||
df2c87559f | |||
1996464363 | |||
074b54ece0 | |||
dfa50bbcc7 | |||
1fa2957876 | |||
997758cc59 | |||
d5435c63ad | |||
84798939dd | |||
9171be99fa | |||
5ece7eea5e | |||
4f0a412548 | |||
0cd403b77d | |||
b7183d2a24 | |||
210a588b83 | |||
2633099825 | |||
185184f6ed | |||
4828c80eb6 | |||
a2aaeabe4c | |||
699d053333 | |||
0be68c3f98 | |||
2997cba8ed | |||
5c8cecbfc9 | |||
42351ed046 | |||
e3be199e43 | |||
17909cb1a4 | |||
ab055c24e1 | |||
8b36ab4073 | |||
de103af9ba | |||
c779a7b266 | |||
441e8406f0 | |||
2129f56cbb | |||
4980268067 | |||
3380a7b98b | |||
575729695b | |||
d190ab06db | |||
027fcb069c | |||
7d5a1ca0e6 | |||
4b88d4e475 | |||
f2b7cf493e | |||
c2a403a7d5 | |||
71b022d826 | |||
cc124f93c6 | |||
e53347d6f9 |
25 changed files with 672 additions and 0 deletions
73
_config/nvim/UltiSnips/bsv.snippets
Normal file
73
_config/nvim/UltiSnips/bsv.snippets
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
snippet package
|
||||||
|
package $1;
|
||||||
|
$0
|
||||||
|
endpackage
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet import
|
||||||
|
import $1 :: *;
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet interface
|
||||||
|
interface $1;
|
||||||
|
$0
|
||||||
|
endinterface
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet module
|
||||||
|
module mk$1($2);
|
||||||
|
$0
|
||||||
|
endmodule
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet rule
|
||||||
|
rule $1($2);
|
||||||
|
$0
|
||||||
|
endrule
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet Action
|
||||||
|
method Action $1($2);
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet ActionValue
|
||||||
|
method ActionValue#($1) $2($3);
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet Value
|
||||||
|
method $1 $2($3);
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet Reg
|
||||||
|
Reg#($1) $2 <- mkReg($3);
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet begin
|
||||||
|
begin
|
||||||
|
$0
|
||||||
|
end
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet if
|
||||||
|
if ($1)
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet tb
|
||||||
|
package $1Tb;
|
||||||
|
import $1 :: *;
|
||||||
|
|
||||||
|
module mk$1Tb();
|
||||||
|
rule test;
|
||||||
|
$display("Test here");
|
||||||
|
$finish();
|
||||||
|
endrule
|
||||||
|
endmodule
|
||||||
|
endpackage
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet matches
|
||||||
|
case ($1) matches
|
||||||
|
tagged $2:
|
||||||
|
$0
|
||||||
|
endcase
|
||||||
|
endsnippet
|
9
_config/nvim/UltiSnips/c.snippets
Normal file
9
_config/nvim/UltiSnips/c.snippets
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
snippet main
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
printf("Hello, World!\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
endsnippet
|
43
_config/nvim/UltiSnips/cpp.snippets
Normal file
43
_config/nvim/UltiSnips/cpp.snippets
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
snippet main
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
cout << "Hello, World!" << endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet oshh
|
||||||
|
#define OSH_H_IMPLEMENTATION
|
||||||
|
#include "osh.h"
|
||||||
|
|
||||||
|
using namespace osh;
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
println("Hello, World!");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet oshh
|
||||||
|
#define OSH_H_IMPLEMENTATION
|
||||||
|
#include "osh.h"
|
||||||
|
|
||||||
|
using namespace osh;
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
println("Hello, World!");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet fori
|
||||||
|
for (int $1 = $2; $1 < $3; $1++) {
|
||||||
|
$0
|
||||||
|
}
|
||||||
|
endsnippet
|
6
_config/nvim/UltiSnips/haskell.snippets
Normal file
6
_config/nvim/UltiSnips/haskell.snippets
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
snippet main
|
||||||
|
module Main where
|
||||||
|
|
||||||
|
main :: IO ()
|
||||||
|
main = putStrLn "Hello, World"
|
||||||
|
endsnippet
|
14
_config/nvim/UltiSnips/html.snippets
Normal file
14
_config/nvim/UltiSnips/html.snippets
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
snippet html
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>$1</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1>$1</h1>
|
||||||
|
$0
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
endsnippet
|
27
_config/nvim/UltiSnips/make.snippets
Normal file
27
_config/nvim/UltiSnips/make.snippets
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
snippet latex
|
||||||
|
TEX := $(wildcard *.tex)
|
||||||
|
|
||||||
|
$1.pdf: ${TEX}
|
||||||
|
pdflatex -jobname=$1 $^
|
||||||
|
pdflatex -jobname=$1 $^ # Fixed toc
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf *.aux *.log *.pdf
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet cpp
|
||||||
|
CXXFLAGS := -ggdb -std=c++20 -I.
|
||||||
|
|
||||||
|
$1: $1.cpp
|
||||||
|
$(CXX) $(CXXFLAGS) -o $@ $^
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet bsv
|
||||||
|
SRC := $(wildcard *.bsv)
|
||||||
|
|
||||||
|
$1: $1.bo
|
||||||
|
bsc -aggressive-conditions -u -sim -e mk$1 -o $@
|
||||||
|
|
||||||
|
$1.bo: $1.bsv $(SRC)
|
||||||
|
bsc -aggressive-conditions -u -sim -g mk$1 $<
|
||||||
|
endsnippet
|
63
_config/nvim/UltiSnips/plaintex.snippets
Normal file
63
_config/nvim/UltiSnips/plaintex.snippets
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
snippet doc
|
||||||
|
\documentclass[a4paper]{article}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
||||||
|
$0
|
||||||
|
|
||||||
|
\end{document}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet begin
|
||||||
|
\begin{$1}
|
||||||
|
$0
|
||||||
|
\end{$1}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet code
|
||||||
|
{\ttfamily $1}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet color
|
||||||
|
{\color{$1} $2}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet table
|
||||||
|
\begin{tabular}{ $1 }
|
||||||
|
$2 & $3 \\\\
|
||||||
|
cell4 & cell5 \\\\
|
||||||
|
\end{tabular}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet multicols
|
||||||
|
\begin{multicols}{2}
|
||||||
|
Now, we are adding some text here to understand how multiple columns will come up.
|
||||||
|
|
||||||
|
\columnbreak
|
||||||
|
|
||||||
|
This is again some new text here. Just to show you how the text is placed
|
||||||
|
\end{multicols}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet newcommand
|
||||||
|
\newcommand{$1}[$2]{$0}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet arraystretch
|
||||||
|
\renewcommand*{\arraystretch}{$1}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet task
|
||||||
|
% Aufgabe $1
|
||||||
|
\begin{task}[points=auto]{$2}\label{ex:H$1}
|
||||||
|
$0
|
||||||
|
\end{task}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet subtask
|
||||||
|
% Teilaufgabe $1
|
||||||
|
\begin{subtask*}[points=$3]{$2}\label{ex:H$1}
|
||||||
|
$0
|
||||||
|
\end{subtask*}
|
||||||
|
endsnippet
|
0
_config/nvim/UltiSnips/snippets.snippets
Normal file
0
_config/nvim/UltiSnips/snippets.snippets
Normal file
63
_config/nvim/UltiSnips/tex.snippets
Normal file
63
_config/nvim/UltiSnips/tex.snippets
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
snippet doc
|
||||||
|
\documentclass[a4paper]{article}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
||||||
|
$0
|
||||||
|
|
||||||
|
\end{document}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet begin
|
||||||
|
\begin{$1}
|
||||||
|
$0
|
||||||
|
\end{$1}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet code
|
||||||
|
{\ttfamily $1}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet color
|
||||||
|
{\color{$1} $2}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet table
|
||||||
|
\begin{tabular}{ c | c }
|
||||||
|
cell1 & cell2 \\\\
|
||||||
|
cell3 & cell4 \\\\
|
||||||
|
\end{tabular}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet multicols
|
||||||
|
\begin{multicols}{2}
|
||||||
|
Now, we are adding some text here to understand how multiple columns will come up.
|
||||||
|
|
||||||
|
\columnbreak
|
||||||
|
|
||||||
|
This is again some new text here. Just to show you how the text is placed
|
||||||
|
\end{multicols}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet newcommand
|
||||||
|
\newcommand{$1}[$2]{$0}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet arraystretch
|
||||||
|
\renewcommand*{\arraystretch}{$1}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet task
|
||||||
|
% Aufgabe $1
|
||||||
|
\begin{task}[points=auto]{$2}\label{ex:H$1}
|
||||||
|
$0
|
||||||
|
\end{task}
|
||||||
|
endsnippet
|
||||||
|
|
||||||
|
snippet subtask
|
||||||
|
% Teilaufgabe $1
|
||||||
|
\begin{subtask*}[points=$3]{$2}\label{ex:H$1}
|
||||||
|
$0
|
||||||
|
\end{subtask*}
|
||||||
|
endsnippet
|
4
_config/nvim/colors.vim
Normal file
4
_config/nvim/colors.vim
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
autocmd colorscheme * highlight EndOfBuffer guibg=NONE ctermbg=NONE
|
||||||
|
autocmd colorscheme * highlight Normal guibg=NONE ctermbg=NONE
|
||||||
|
autocmd colorscheme * highlight NonText guibg=NONE ctermbg=NONE
|
||||||
|
colorscheme desert
|
6
_config/nvim/init.vim
Normal file
6
_config/nvim/init.vim
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
runtime plugins.vim
|
||||||
|
runtime mappings.vim
|
||||||
|
runtime settings.vim
|
||||||
|
runtime spelling.vim
|
||||||
|
runtime colors.vim
|
||||||
|
runtime qt.vim
|
24
_config/nvim/mappings.vim
Normal file
24
_config/nvim/mappings.vim
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
let maplocalleader = ","
|
||||||
|
let mapleader = ','
|
||||||
|
let VM_leader = ','
|
||||||
|
|
||||||
|
noremap <leader>/ :Commentary<cr>
|
||||||
|
|
||||||
|
" noremap <F4> :make!<cr>
|
||||||
|
" noremap <F3> :! ./%<cr>
|
||||||
|
|
||||||
|
noremap <A-f> :Files<cr>
|
||||||
|
noremap <A-b> :Buffers<cr>
|
||||||
|
|
||||||
|
noremap <A-t> :terminal<cr>
|
||||||
|
|
||||||
|
noremap <A-g> :Git<cr>
|
||||||
|
|
||||||
|
noremap <A-n> :NERDTreeToggle<cr>
|
||||||
|
|
||||||
|
nnoremap <localleader>lt :call vimtex#fzf#run()<cr>
|
||||||
|
|
||||||
|
tnoremap <C-w> <C-\><C-n><C-w>
|
||||||
|
|
||||||
|
vnoremap J :m '>+1<CR>gv=gv
|
||||||
|
vnoremap K :m '<-2<CR>gv=gv
|
9
_config/nvim/plugin/cpp.vim
Normal file
9
_config/nvim/plugin/cpp.vim
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
function! s:insert_gates()
|
||||||
|
let gatename = substitute(toupper(expand("%:t")), "\\.", "_", "g")
|
||||||
|
execute "normal! i#ifndef " . gatename
|
||||||
|
execute "normal! o#define " . gatename . " "
|
||||||
|
execute "normal! Go#endif /* " . gatename . " */"
|
||||||
|
normal! kk
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
autocmd BufNewFile *.{h,hpp} call <SID>insert_gates()
|
94
_config/nvim/plugin/dap.lua
Normal file
94
_config/nvim/plugin/dap.lua
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
local dap = require("dap")
|
||||||
|
local dapui = require("dapui")
|
||||||
|
|
||||||
|
dapui.setup({
|
||||||
|
layouts = {
|
||||||
|
{
|
||||||
|
position = "left",
|
||||||
|
size = 0.3,
|
||||||
|
elements = {
|
||||||
|
{ id = "scopes", size = 0.25 },
|
||||||
|
"stacks",
|
||||||
|
"watches",
|
||||||
|
"breakpoints",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
position = "bottom",
|
||||||
|
size = 20,
|
||||||
|
elements = {
|
||||||
|
"repl",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
dap.adapters.lldb = {
|
||||||
|
type = 'server',
|
||||||
|
host = '127.0.0.1',
|
||||||
|
port = "${port}",
|
||||||
|
executable = {
|
||||||
|
command = '/usr/bin/lldb-dap',
|
||||||
|
args = { "--port", "${port}" },
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dap.configurations.rust = {
|
||||||
|
{
|
||||||
|
name = "Attach to Remote via GDB Remote",
|
||||||
|
type = "lldb",
|
||||||
|
request = "launch",
|
||||||
|
program = function()
|
||||||
|
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||||
|
end,
|
||||||
|
cwd = "${workspaceFolder}",
|
||||||
|
stopOnEntry = false,
|
||||||
|
|
||||||
|
initCommands = {
|
||||||
|
"gdb-remote localhost:1234",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-- dap.configurations.rust = {
|
||||||
|
-- {
|
||||||
|
-- name = "Launch File",
|
||||||
|
-- type = "codelldb",
|
||||||
|
-- request = "launch",
|
||||||
|
-- program = function()
|
||||||
|
-- return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||||
|
-- end,
|
||||||
|
-- cwd = '${workspaceFolder}',
|
||||||
|
-- runInTerminal = true,
|
||||||
|
-- stopOnEntry = false,
|
||||||
|
-- },
|
||||||
|
-- }
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<Leader>dc', function() dap.continue() end)
|
||||||
|
vim.keymap.set('n', '<F10>', function() dap.step_over() end)
|
||||||
|
vim.keymap.set('n', '<F11>', function() dap.step_into() end)
|
||||||
|
vim.keymap.set('n', '<F12>', function() dap.step_out() end)
|
||||||
|
vim.keymap.set('n', '<Leader>db', function() dap.toggle_breakpoint() end)
|
||||||
|
vim.keymap.set('n', '<Leader>dl', function() dap.run_last() end)
|
||||||
|
vim.keymap.set('n', '<Leader>du', function() dapui.toggle() end)
|
||||||
|
vim.keymap.set('n', '<Leader>df', function() dapui.float_element('scopes', { enter = true }) end)
|
||||||
|
|
||||||
|
dap.listeners.before.attach.dapui_config = function()
|
||||||
|
dapui.open()
|
||||||
|
end
|
||||||
|
dap.listeners.before.launch.dapui_config = function()
|
||||||
|
dapui.open()
|
||||||
|
end
|
||||||
|
-- dap.listeners.before.event_terminated.dapui_config = function()
|
||||||
|
-- dapui.close()
|
||||||
|
-- end
|
||||||
|
-- dap.listeners.before.event_exited.dapui_config = function()
|
||||||
|
-- dapui.close()
|
||||||
|
-- end
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||||
|
pattern = "dapui-repl-*",
|
||||||
|
callback = function()
|
||||||
|
vim.cmd("AnsiEsc")
|
||||||
|
end,
|
||||||
|
})
|
49
_config/nvim/plugin/lsp.lua
Normal file
49
_config/nvim/plugin/lsp.lua
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
vim.diagnostic.config({ virtual_text = true })
|
||||||
|
|
||||||
|
local lsp = require('lsp-zero').preset({})
|
||||||
|
|
||||||
|
lsp.on_attach(function(client, bufnr)
|
||||||
|
-- see :help lsp-zero-keybindings
|
||||||
|
-- to learn the available actions
|
||||||
|
lsp.default_keymaps({buffer = bufnr})
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- " (Optional) Configure lua language server for neovim
|
||||||
|
require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls())
|
||||||
|
|
||||||
|
-- You need to setup `cmp` after lsp-zero
|
||||||
|
local cmp = require('cmp')
|
||||||
|
local cmp_action = require('lsp-zero').cmp_action()
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
mapping = {
|
||||||
|
-- `Enter` key to confirm completion
|
||||||
|
['<CR>'] = cmp.mapping.confirm({select = false}),
|
||||||
|
|
||||||
|
-- Ctrl+Space to trigger completion menu
|
||||||
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
|
|
||||||
|
-- Navigate between snippet placeholder
|
||||||
|
['<C-f>'] = cmp_action.luasnip_jump_forward(),
|
||||||
|
['<C-b>'] = cmp_action.luasnip_jump_backward(),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
lsp.ensure_installed({
|
||||||
|
'ts_ls',
|
||||||
|
})
|
||||||
|
|
||||||
|
local null_ls = require('null-ls')
|
||||||
|
local null_opts = lsp.build_options('null-ls', {})
|
||||||
|
|
||||||
|
null_ls.setup({
|
||||||
|
on_attach = function(client, bufnr)
|
||||||
|
null_opts.on_attach(client, bufnr)
|
||||||
|
--- you can add more stuff here if you need it
|
||||||
|
end,
|
||||||
|
sources = {
|
||||||
|
null_ls.builtins.formatting.black,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
lsp.setup()
|
1
_config/nvim/plugin/nasm.vim
Normal file
1
_config/nvim/plugin/nasm.vim
Normal file
|
@ -0,0 +1 @@
|
||||||
|
autocmd BufNewFile,BufRead *.asm set filetype=nasm
|
13
_config/nvim/plugin/rust.lua
Normal file
13
_config/nvim/plugin/rust.lua
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
local rt = require("rust-tools")
|
||||||
|
|
||||||
|
rt.setup({
|
||||||
|
server = {
|
||||||
|
on_attach = function(_, bufnr)
|
||||||
|
-- Hover actions
|
||||||
|
vim.keymap.set("n", "<C-space>", rt.hover_actions.hover_actions, { buffer = bufnr })
|
||||||
|
|
||||||
|
-- Code action groups
|
||||||
|
vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
})
|
11
_config/nvim/plugin/tex.vim
Normal file
11
_config/nvim/plugin/tex.vim
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
let g:vimtex_view_method = 'zathura'
|
||||||
|
let g:vimtex_compiler_method = 'latexmk'
|
||||||
|
let g:vimtex_quickfix_open_on_warning = 0
|
||||||
|
let g:vimtex_quickfix_mode = 2
|
||||||
|
|
||||||
|
let g:vimtex_compiler_latexmk = {
|
||||||
|
\ 'out_dir' : '.vimtex',
|
||||||
|
\}
|
||||||
|
|
||||||
|
" This is necessary for VimTeX to load properly. The "indent" is optional.
|
||||||
|
" Note that most plugin managers will do this automatically.
|
8
_config/nvim/plugin/typescript.lua
Normal file
8
_config/nvim/plugin/typescript.lua
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
local lspconfig = require('lspconfig')
|
||||||
|
|
||||||
|
lspconfig.ts_ls.setup({
|
||||||
|
on_attach = function(client, bufnr)
|
||||||
|
-- Disable tsserver formatting if using prettier/eslint
|
||||||
|
client.server_capabilities.documentFormattingProvider = true
|
||||||
|
end,
|
||||||
|
})
|
42
_config/nvim/plugins.vim
Normal file
42
_config/nvim/plugins.vim
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
call plug#begin(stdpath('data') . '/plugged')
|
||||||
|
Plug 'preservim/nerdtree'
|
||||||
|
Plug 'tpope/vim-fugitive'
|
||||||
|
Plug 'vim-syntastic/syntastic'
|
||||||
|
Plug 'junegunn/fzf.vim'
|
||||||
|
Plug 'tpope/vim-surround'
|
||||||
|
" Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
||||||
|
" Plug 'deoplete-plugins/deoplete-clang'
|
||||||
|
" Plug 'deoplete-plugins/deoplete-jedi'
|
||||||
|
" Plug 'deoplete-plugins/deoplete-go', { 'do': 'make'}
|
||||||
|
" Plug 'carlitux/deoplete-ternjs', { 'do': 'npm install tern'}
|
||||||
|
" Plug 'tbodt/deoplete-tabnine', { 'do': './install.sh' }
|
||||||
|
Plug 'mg979/vim-visual-multi'
|
||||||
|
" Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
|
||||||
|
" Plug 'ndmitchell/ghcid', { 'rtp': 'plugins/nvim' }
|
||||||
|
Plug 'luochen1990/rainbow'
|
||||||
|
" Plug 'wlangstroth/vim-racket'
|
||||||
|
Plug 'sirver/ultisnips'
|
||||||
|
Plug 'lervag/vimtex'
|
||||||
|
Plug 'tpope/vim-commentary'
|
||||||
|
|
||||||
|
" LSP Support
|
||||||
|
Plug 'neovim/nvim-lspconfig'
|
||||||
|
Plug 'williamboman/mason.nvim'
|
||||||
|
Plug 'williamboman/mason-lspconfig.nvim'
|
||||||
|
|
||||||
|
Plug 'nvim-lua/plenary.nvim'
|
||||||
|
Plug 'nvimtools/none-ls.nvim'
|
||||||
|
|
||||||
|
" Autocompletion
|
||||||
|
Plug 'hrsh7th/nvim-cmp'
|
||||||
|
Plug 'hrsh7th/cmp-nvim-lsp'
|
||||||
|
Plug 'L3MON4D3/LuaSnip'
|
||||||
|
|
||||||
|
Plug 'VonHeikemen/lsp-zero.nvim', {'branch': 'v2.x'}
|
||||||
|
|
||||||
|
Plug 'simrat39/rust-tools.nvim'
|
||||||
|
|
||||||
|
Plug 'mfussenegger/nvim-dap'
|
||||||
|
Plug 'rcarriga/nvim-dap-ui'
|
||||||
|
Plug 'nvim-neotest/nvim-nio'
|
||||||
|
call plug#end()
|
4
_config/nvim/qt.vim
Normal file
4
_config/nvim/qt.vim
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
if has('gui_running')
|
||||||
|
set guifont="Source Code Pro:h16"
|
||||||
|
colorscheme gruvbox
|
||||||
|
endif
|
54
_config/nvim/settings.vim
Normal file
54
_config/nvim/settings.vim
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
set mouse=a
|
||||||
|
|
||||||
|
set splitbelow
|
||||||
|
set splitright
|
||||||
|
|
||||||
|
set complete+=kspell
|
||||||
|
set completeopt-=preview
|
||||||
|
|
||||||
|
set number
|
||||||
|
set relativenumber
|
||||||
|
|
||||||
|
set expandtab
|
||||||
|
set shiftwidth=4
|
||||||
|
set smarttab
|
||||||
|
set softtabstop=0
|
||||||
|
set tabstop=8
|
||||||
|
|
||||||
|
set listchars=tab:→\ ,trail:-,extends:»,precedes:«,nbsp:+,lead:␣
|
||||||
|
set list
|
||||||
|
|
||||||
|
set scrolloff=5
|
||||||
|
|
||||||
|
autocmd TermOpen,TermEnter * setlocal nonumber norelativenumber nospell nohlsearch
|
||||||
|
|
||||||
|
let g:deoplete#enable_at_startup = 1
|
||||||
|
|
||||||
|
let g:rainbow_active = 1
|
||||||
|
|
||||||
|
let g:syntastic_enable_racket_racket_checker = 1
|
||||||
|
let g:syntastic_cpp_compiler_options = '-std=c++20'
|
||||||
|
let g:syntastic_nasm_nasm_args = '-f elf64'
|
||||||
|
let g:syntastic_python_checkers = ['python']
|
||||||
|
let g:syntastic_tex_lacheck_quiet_messages = { 'regex': '\Vpossible unwanted space at' }
|
||||||
|
|
||||||
|
let g:lsc_auto_map = {
|
||||||
|
\ 'GoToDefinition': '<C-]>',
|
||||||
|
\ 'GoToDefinitionSplit': ['<C-W>]', '<C-W><C-]>'],
|
||||||
|
\ 'FindReferences': 'gr',
|
||||||
|
\ 'NextReference': ',',
|
||||||
|
\ 'PreviousReference': ';',
|
||||||
|
\ 'FindImplementations': 'gI',
|
||||||
|
\ 'FindCodeActions': 'ga',
|
||||||
|
\ 'Rename': 'gR',
|
||||||
|
\ 'ShowHover': v:true,
|
||||||
|
\ 'DocumentSymbol': 'go',
|
||||||
|
\ 'WorkspaceSymbol': 'gS',
|
||||||
|
\ 'SignatureHelp': 'gm',
|
||||||
|
\ 'Completion': 'completefunc',
|
||||||
|
\}
|
||||||
|
let g:lsc_server_commands = {
|
||||||
|
\ 'python': 'pyright-langserver --stdio',
|
||||||
|
\ 'scala': 'metals',
|
||||||
|
\ 'javascript': 'typescript-language-server --stdio'
|
||||||
|
\}
|
4
_config/nvim/spelling.vim
Normal file
4
_config/nvim/spelling.vim
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
set spelllang=de,en
|
||||||
|
|
||||||
|
autocmd FileType gitcommit setlocal spell spelllang=en
|
||||||
|
autocmd Filetype tex,markdown,mail setlocal linebreak spell spelllang=de
|
1
_latexmkrc
Normal file
1
_latexmkrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
$pdflatex = 'lualatex --shell-escape %O %S';
|
50
_zshrc
Executable file
50
_zshrc
Executable file
|
@ -0,0 +1,50 @@
|
||||||
|
#!/bin/zsh
|
||||||
|
|
||||||
|
# The following lines were added by compinstall
|
||||||
|
zstyle ':completion:*' completer _expand _complete _ignored
|
||||||
|
zstyle ':completion:*' list-colors ''
|
||||||
|
zstyle ':completion:*' menu select=0
|
||||||
|
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
|
||||||
|
zstyle :compinstall filename '/home/osh/.zshrc'
|
||||||
|
|
||||||
|
autoload -Uz compinit
|
||||||
|
compinit
|
||||||
|
# End of lines added by compinstall
|
||||||
|
|
||||||
|
# Lines configured by zsh-newuser-install
|
||||||
|
HISTFILE=~/.histfile
|
||||||
|
HISTSIZE=1000
|
||||||
|
SAVEHIST=1000
|
||||||
|
setopt appendhistory nomatch notify extendedglob
|
||||||
|
bindkey -v
|
||||||
|
# End of lines configured by zsh-newuser-install
|
||||||
|
|
||||||
|
# Change cursor shape for different vi modes.
|
||||||
|
function zle-keymap-select {
|
||||||
|
if [[ ${KEYMAP} == vicmd ]] ||
|
||||||
|
[[ $1 = 'block' ]]; then
|
||||||
|
echo -ne '\e[1 q'
|
||||||
|
|
||||||
|
elif [[ ${KEYMAP} == main ]] ||
|
||||||
|
[[ ${KEYMAP} == viins ]] ||
|
||||||
|
[[ ${KEYMAP} = '' ]] ||
|
||||||
|
[[ $1 = 'beam' ]]; then
|
||||||
|
echo -ne '\e[5 q'
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
zle -N zle-keymap-select
|
||||||
|
|
||||||
|
[ -f "$HOME/.bashrc" ] && emulate sh -c "source $HOME/.bashrc"
|
||||||
|
|
||||||
|
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
|
source /usr/share/fzf/key-bindings.zsh
|
||||||
|
source /usr/share/fzf/completion.zsh
|
||||||
|
|
||||||
|
setopt interactivecomments
|
||||||
|
setopt HIST_IGNORE_SPACE
|
||||||
|
|
||||||
|
eval $(thefuck --alias)
|
||||||
|
|
||||||
|
export PS1="
|
||||||
|
%{$(tput bold)%}%{$(tput setaf 1)%}[%{$(tput setaf 3)%}%n%{$(tput setaf 2)%}@%{$(tput setaf 4)%}%M %{$(tput setaf 5)%}%~%{$(tput setaf 1)%}]%{$(tput setaf 7)%}
|
||||||
|
$ %{$(tput sgr0)%}"
|
Loading…
Add table
Reference in a new issue