Merge remote-tracking branch 'origin/master' into server

This commit is contained in:
Christoph J. Scherr 2023-09-27 11:27:42 +02:00
commit 2ef1c2fa60
11 changed files with 314 additions and 53 deletions

View File

@ -14,6 +14,15 @@ vim.api.nvim_create_autocmd({ 'FocusGained', 'TermClose', 'TermLeave' }, {
command = 'checktime',
})
-- Caution: Causes Errors?
-- -- Open Neotree in new tabs
-- vim.api.nvim_create_autocmd({'TabNewEntered' }, {
-- group = augroup('automatic_neotree'),
-- callback = function()
-- vim.cmd('Neotree')
-- end,
-- })
-- Go to last loc when opening a buffer, see ':h last-position-jump'
vim.api.nvim_create_autocmd('BufReadPost', {
group = augroup('last_loc'),
@ -79,7 +88,7 @@ vim.api.nvim_create_autocmd('BufWritePre', {
-- Disable conceallevel for specific file-types.
vim.api.nvim_create_autocmd('FileType', {
group = augroup('fix_conceallevel'),
pattern = { 'markdown' },
pattern = { 'latex', 'tex' },
callback = function()
vim.opt_local.conceallevel = 0
end,

View File

@ -25,7 +25,7 @@ local defaults = {
-- String like `habamax` or a function that will load the colorscheme.
-- Disabled by default to allow theme-loader.nvim to manage the colorscheme.
---@type string|fun()
colorscheme = '',
colorscheme = 'kanagawa',
features = {
elite_mode = true,

View File

@ -36,8 +36,8 @@ map('n', '<leader>l', '<cmd>Lazy<cr>', { desc = 'Open Lazy UI' })
--map({ 'n', 'x' }, 'J', "<C-d>")
-- Easier line-wise movement
map({'n', 'v'}, 'H', 'g^')
map({'n', 'v'}, 'L', 'g$')
map({'n', 'v'}, 'H', '<HOME>')
map({'n', 'v'}, 'L', '<END>')
-- Toggle fold or select option from popup menu
---@return string
@ -84,6 +84,10 @@ map('n', 'zh', 'z4h')
map('n', 'zn', ']s')
map('n', 'zN', '[s')
-- move screen and line up
map('n', '<C-k>', '<C-y>k')
map('n', '<C-j>', '<C-e>j')
-- Clipboard
-- ===
@ -344,8 +348,8 @@ map('n', '<leader>"', '<cmd>vsplit<CR>', { desc = 'Split window vertically' })
map('n', '<leader>wb', '<cmd>buffer#<CR>', { desc = 'Alternate buffer' })
map('n', '<leader>wc', '<cmd>close<CR>', { desc = 'Close window' })
map('n', '<leader>wd', '<cmd>bdelete<CR>', { desc = 'Buffer delete' })
map('n', '<leader>wv', '<cmd>split<CR>', { desc = 'Split window horizontally' })
map('n', '<leader>wg', '<cmd>vsplit<CR>', { desc = 'Split window vertically' })
map('n', '<leader>w%', '<cmd>split<CR>', { desc = 'Split window horizontally' })
map('n', '<leader>w"', '<cmd>vsplit<CR>', { desc = 'Split window vertically' })
map('n', '<leader>wt', '<cmd>tabnew<CR>', { desc = 'New tab' })
map('n', '<leader>wtp', '<cmd>tabprevious<CR>', { desc = 'Previous tab' })
map('n', '<leader>wtn', '<cmd>tabnext<CR>', { desc = 'Next tab' })

View File

@ -323,4 +323,63 @@ return {
vim.g.dsf_no_mappings = 1
end,
},
-----------------------------------------------------------------------------
{
-- TODO:
-- make debugging for C. Cpp, Rust, Python work
'mfussenegger/nvim-dap',
keys = {
{
'<leader>db',
'<cmd>lua require\'dap\'.toggle_breakpoint()<CR>',
mode = { 'n', 'x' },
desc = 'Debugging: Toggle breakpoint',
},
{
'<leader>dc',
'<cmd>lua require\'dap\'.continue()<CR>',
mode = { 'n', 'x' },
desc = 'Debugging: Start or continue debug session',
},
{
'<leader>dsi',
'<cmd>lua require\'dap\'.step_into()<CR>',
mode = { 'n', 'x' },
desc = 'Debugging: Step into code',
},
{
'<leader>dso',
'<cmd>lua require\'dap\'.step_over()<CR>',
mode = { 'n', 'x' },
desc = 'Debugging: Step over code',
},
{
'<leader>dr',
'<cmd>lua require\'dap\'.repl.open()<CR>',
mode = { 'n', 'x' },
desc = 'Debugging: repl Menu',
},
{
'<leader>dms',
function()
local widgets = require('dap.ui.widgets')
local my_sidebar = widgets.sidebar(widgets.scopes)
my_sidebar.open()
end,
mode = { 'n', 'x' },
desc = 'Debugging: Menu scopes',
},
{
'<leader>dmf',
function()
local widgets = require('dap.ui.widgets')
local my_sidebar = widgets.sidebar(widgets.frames)
my_sidebar.open()
end,
mode = { 'n', 'x' },
desc = 'Debugging: Menu frames',
},
},
},
}

View File

@ -1,15 +1,4 @@
-- Plugins: Colorschemes
-- https://github.com/rafi/vim-config
return {
{
'rafi/theme-loader.nvim',
lazy = false,
priority = 99,
opts = { initial_colorscheme = 'kanagawa' },
},
{ 'rafi/neo-hybrid.vim', priority = 100, lazy = false },
{ 'rafi/awesome-vim-colorschemes', lazy = false },
{ 'AlexvZyl/nordic.nvim' },
@ -24,7 +13,7 @@ return {
lazy = true,
name = 'catppuccin',
opts = {
flavour = 'mocha', -- latte, frappe, macchiato, mocha
flavour = 'latte', -- latte, frappe, macchiato, mocha
dim_inactive = { enabled = false },
integrations = {
alpha = true,
@ -72,15 +61,15 @@ return {
},
{
'rebelot/kanagawa.nvim',
lazy = true,
lazy = false,
name = 'kanagawa',
config = function()
require('kanagawa').setup({
compile = false, -- enable compiling the colorscheme
compile = true, -- enable compiling the colorscheme
undercurl = true, -- enable undercurls
commentStyle = { italic = true },
commentStyle = { italic = false },
functionStyle = {},
keywordStyle = { italic = true},
keywordStyle = { bold = true },
statementStyle = { bold = true },
typeStyle = {},
transparent = false, -- do not set background color
@ -93,13 +82,12 @@ return {
overrides = function(colors) -- add/modify highlights
return {}
end,
theme = "wave", -- Load "wave" theme when 'background' option is not set
theme = "dragon", -- Load "wave" theme when 'background' option is not set
background = { -- map the value of 'background' option to a theme
dark = "wave", -- try "dragon" !
light = "lotus"
},
})
end
},
}

View File

@ -0,0 +1,64 @@
return {
{
'mfussenegger/nvim-dap',
-- optional = true,
dependencies = {
'mfussenegger/nvim-dap-python',
},
-- stylua: ignore
-- keys = {
-- { '<leader>dPt', function() require('dap-python').test_method() end, desc = 'Debug Method' },
-- { '<leader>dPc', function() require('dap-python').test_class() end, desc = 'Debug Class' },
-- },
opts = function()
local dap = require('dap')
dap.adapters.cppdbg = {
id = 'cppdbg',
type = 'executable',
command = '/home/cscherr/.local/share/nvim/nvim-dap/debuggers/cpptools/extension/debugAdapters/bin/OpenDebugAD7',
}
dap.configurations.cpp = {
{
name = "Launch file",
type = "cppdbg",
request = "launch",
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
cwd = '${workspaceFolder}',
stopAtEntry = true,
setupCommands = {
{
text = '-enable-pretty-printing',
description = 'enable pretty printing',
ignoreFailures = false
},
},
},
{
name = 'Attach to gdbserver :1234',
type = 'cppdbg',
request = 'launch',
MIMode = 'gdb',
miDebuggerServerAddress = 'localhost:1234',
miDebuggerPath = '/usr/bin/gdb',
cwd = '${workspaceFolder}',
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
setupCommands = {
{
text = '-enable-pretty-printing',
description = 'enable pretty printing',
ignoreFailures = false
},
},
},
}
dap.configurations.c = dap.configurations.cpp
dap.configurations.rust = dap.configurations.cpp
end,
},
}

View File

@ -0,0 +1,42 @@
return {
{
'mfussenegger/nvim-dap',
optional = true,
dependencies = {
'mfussenegger/nvim-dap-python',
},
-- stylua: ignore
-- keys = {
-- { '<leader>dPt', function() require('dap-python').test_method() end, desc = 'Debug Method' },
-- { '<leader>dPc', function() require('dap-python').test_class() end, desc = 'Debug Class' },
-- },
config = function()
local dap = require('dap')
dap.configurations.rust = {
{
-- ... the previous config goes here ...,
initCommands = function()
-- Find out where to look for the pretty printer Python module
local rustc_sysroot = vim.fn.trim(vim.fn.system('rustc --print sysroot'))
local script_import = 'command script import "' .. rustc_sysroot .. '/lib/rustlib/etc/lldb_lookup.py"'
local commands_file = rustc_sysroot .. '/lib/rustlib/etc/lldb_commands'
local commands = {}
local file = io.open(commands_file, 'r')
if file then
for line in file:lines() do
table.insert(commands, line)
end
file:close()
end
table.insert(commands, 1, script_import)
return commands
end,
-- ...,
}
}
end,
},
}

View File

@ -4,11 +4,19 @@ return {
event = 'VeryLazy',
opts = {
options = {
-- :h bufferline-configuration
mode = 'tabs',
separator_style = 'slant',
separator_style = {"", ""},
themable = true,
numbers = "ordinal",
show_close_icon = false,
show_buffer_close_icons = false,
diagnostics = false,
diagnostics = true,
indicator = {
-- icon = ' ', -- this should be omitted if indicator style is not 'icon'
-- windows terminal sucks
style = 'none',
},
always_show_bufferline = true,
diagnostics_indicator = function(_, _, diag)
local icons = require('plex.config').icons.diagnostics
@ -39,6 +47,7 @@ return {
text_align = 'center',
},
},
},
},
},

View File

@ -243,8 +243,8 @@ return {
-- Plugins
{ '<localleader>n', plugin_directories, desc = 'Plugins' },
{ '<localleader>k', '<cmd>Telescope thesaurus lookup<CR>', desc = 'Thesaurus' },
{ '<localleader>w', '<cmd>ZkNotes<CR>', desc = 'Zk notes' },
-- { '<localleader>k', '<cmd>Telescope thesaurus lookup<CR>', desc = 'Thesaurus' },
-- { '<localleader>w', '<cmd>ZkNotes<CR>', desc = 'Zk notes' },
{
'<localleader>z',

View File

@ -108,3 +108,89 @@ Theoriephase
weise/!
Weise
merksam
Syscall
Enum
deu
JS
JS
getElementById
MDN
WebDocs
src
txt
ERRNO
vvvv
Rustonomicon
Rustdoc
paragraph
rustc
Klabnik
io
rustbook
Deserialize
deserialisierbaren
SIGTERM
Beendigungsabfrage
SIGKILL
stdout
stderr
Leveln
gedroppt
#ekonstruktor
Dekonstruktor/!
dealloziiert
Dealloziierung
Dealloziieren
vvvv
TODO
vvvv
Structs
nomicon
Wrapperklasse
tx
rx
struct
enum
priorisierbar
仕方がない
Gleichzeitigkeitsmechanismen
ServiceWrapper
Repräsentierung
Docstrings
Backends
dirs
MessageFrame
Addressor
init
Spektralgestalt
CTS
Addressor
Timestamp
str
BASEDIRECTORY
configs
fifo
PKI
secp384r1
Addressors
Keystore
Fifos
SBC
NTSecureCloudSolutions
newtec
loesungen
subfigure
Shield96
ATSAMA5D27
TrustZone
A5
ARMv7
eMMC
MT25QU0512BBB
ATECC608
Rückwärtskompatibilität
tls
opcua
texttt
rfcp
ssl