Merge branch 'master' into minimal

This commit is contained in:
Christoph J. Scherr 2023-09-13 21:05:47 +02:00
commit 619e8f4a09
9 changed files with 383 additions and 9 deletions

View File

@ -56,13 +56,13 @@ vim.api.nvim_create_autocmd('TextYankPost', {
}) })
-- Automatically set read-only for files being edited elsewhere -- Automatically set read-only for files being edited elsewhere
vim.api.nvim_create_autocmd('SwapExists', { -- vim.api.nvim_create_autocmd('SwapExists', {
group = augroup('open_swap'), -- group = augroup('open_swap'),
nested = true, -- nested = true,
callback = function() -- callback = function()
vim.v.swapchoice = 'o' -- vim.v.swapchoice = 'o'
end, -- end,
}) -- })
-- Create directories when needed, when saving a file (except for URIs "://"). -- Create directories when needed, when saving a file (except for URIs "://").
vim.api.nvim_create_autocmd('BufWritePre', { vim.api.nvim_create_autocmd('BufWritePre', {

View File

@ -28,7 +28,7 @@ local defaults = {
colorscheme = '', colorscheme = '',
features = { features = {
elite_mode = false, elite_mode = true,
window_q_mapping = true, window_q_mapping = true,
}, },

View File

@ -55,6 +55,14 @@ end
map('n', '<A-k>', '<cmd>lnext<CR>', { desc = 'Next Loclist Item' }) map('n', '<A-k>', '<cmd>lnext<CR>', { desc = 'Next Loclist Item' })
map('n', '<A-j>', '<cmd>lprev<CR>', { desc = 'Previous Loclist Item' }) map('n', '<A-j>', '<cmd>lprev<CR>', { desc = 'Previous Loclist Item' })
-- go to next diagnostics entry
map('n', '<C-j>', function ()
vim.diagnostic.goto_next()
end, { desc = 'go to next diagnostic'})
map('n', '<C-k>', function ()
vim.diagnostic.goto_prev()
end, { desc = 'go to last diagnostic'})
-- Whitespace jump (see plugin/whitespace.vim) -- Whitespace jump (see plugin/whitespace.vim)
map('n', ']s', function() map('n', ']s', function()
require('plex.lib.edit').whitespace_jump(1) require('plex.lib.edit').whitespace_jump(1)
@ -122,7 +130,7 @@ map('i', '<S-Return>', '<C-o>o', { desc = 'Start Newline' })
map('n', '<leader>jj', ':join<CR>g$', { desc = 'Join lines', silent = true }) map('n', '<leader>jj', ':join<CR>g$', { desc = 'Join lines', silent = true })
map('n', '<leader>jJ', 'k:join<CR>j', { desc = 'Join lines', silent = true }) map('n', '<leader>jJ', 'k:join<CR>j', { desc = 'Join lines', silent = true })
map('n', '<leader>ss', 'i<CR><ESC>', { desc = 'Split lines', silent = true }) map('n', '<leader>ss', 'i<CR><ESC>', { desc = 'Split lines', silent = true })
map('n', '<leader>sS', 'i<CR><ESC>k', { desc = 'Split lines', silent = true }) map('n', '<leader>sS', 'i<CR><ESC>kg$', { desc = 'Split lines', silent = true })
-- Re-select blocks after indenting in visual/select mode -- Re-select blocks after indenting in visual/select mode
map('x', '<', '<gv', { desc = 'Indent Right and Re-select' }) map('x', '<', '<gv', { desc = 'Indent Right and Re-select' })

View File

@ -0,0 +1,21 @@
return {
{
-- I dont get how this stuff works
'machakann/vim-sandwich',
enabled = false,
-- stylua: ignore
keys = {
-- See https://github.com/machakann/vim-sandwich/blob/master/macros/sandwich/keymap/surround.vim
{ '<leader>sd', '<Plug>(operator-sandwich-delete)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-query-a)', silent = true },
{ '<leader>ssd', '<Plug>(operator-sandwich-delete)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-auto-a)', silent = true },
{ '<leader>sc', '<Plug>(operator-sandwich-replace)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-query-a)', silent = true },
{ '<leader>ssc', '<Plug>(operator-sandwich-replace)<Plug>(operator-sandwich-release-count)<Plug>(textobj-sandwich-auto-a)', silent = true },
{ '<leader>sa', '<Plug>(operator-sandwich-add)', silent = true, mode = { 'n', 'x', 'o' }},
{ '<leader>ir', '<Plug>(textobj-sandwich-auto-i)', silent = true, mode = { 'x', 'o' }},
{ '<leader>ab', '<Plug>(textobj-sandwich-auto-a)', silent = true, mode = { 'x', 'o' }},
},
init = function()
vim.g.sandwich_no_default_key_mappings = 1
end,
},
}

View File

@ -0,0 +1,28 @@
return {
{
"nvim-neorg/neorg",
enabled = false,
lazy = true,
build = ":Neorg sync-parsers",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require("neorg").setup {
load = {
["core.defaults"] = {}, -- Loads default behaviour
["core.concealer"] = {}, -- Adds pretty icons to your documents
["core.export"] = {},
["core.dirman"] = { -- Manages Neorg workspaces
config = {
workspaces = {
-- FIXME: This shouldn't be in the Versioncontrol. Make this
-- into a local extension of the plugin.
main = "~/Nextcloud/Neorg",
notes = "~/Nextcloud/Notizen",
},
},
},
},
}
end,
},
}

View File

@ -0,0 +1,85 @@
local function get_header()
-- see https://github.com/MaximilianLloyd/ascii.nvim
return {
-- The following is a customized version!
[[ ]],
[[ ██ ]],
[[ █ ███████ █████ ██ ]],
[[ ███ █████ █████  ]],
[[ █████ ███ ███████████████████ ███ ███████████ ]],
[[ ██ ██ █ ███ █████████████ █████ ██████████████ ]],
[[ ████ ████ ██████████ █████████ █████ █████ ████ █████ ]],
[[ ██████ ██ ███ ███ █████████ █████ █████ ████ █████ ]],
[[ ████████  ██████████████████ ████ █████ █████ ████ ██████ ]],
[[ ]],
}
end
return {
{
'glepnir/dashboard-nvim',
event = 'VimEnter',
config = function()
require('dashboard').setup({
theme = 'hyper',
config = {
header = get_header(),
week_header = {
enable = false,
},
shortcut = {
{
desc = '󰊳 Update',
group = '@property',
action = 'Lazy update',
key = 'u'
},
{
icon = '',
icon_hl = '@variable',
desc = 'Files',
group = 'Label',
action = 'Telescope find_files',
key = 'f',
},
{
desc = ' Git',
group = 'Label',
action = function()
local Util = require('plex.lib.utils')
Util.float_term({ 'lazygit'}, { cwd = Util.get_root() })
end,
key = 'g',
},
{
desc = ' Neorg',
group = 'Number',
action = 'Neorg workspace main',
key = 'o',
},
{
desc = '󰘁 Sessions',
group = 'Number',
action = 'Telescope persisted',
key = 's',
},
},
project = {
enable = true,
limit = 8,
icon = '',
label = ' Projects',
action = 'Telescope find_files cwd='
},
packages = { enable = true},
mru = { limit = 10, icon = '', label = ' Last Edited'},
-- footer = { 'footer bar foo' },
},
})
end,
dependencies = { {'nvim-tree/nvim-web-devicons'}}
}
}

View File

@ -0,0 +1,194 @@
-- Plugins: Tree-sitter and Syntax
-- https://github.com/rafi/vim-config
return {
-----------------------------------------------------------------------------
-- Vimscript syntax/indent plugins
{ 'iloginow/vim-stylus', ft = 'stylus' },
{ 'chrisbra/csv.vim', ft = 'csv' },
{ 'mustache/vim-mustache-handlebars', ft = { 'mustache', 'handlebars' } },
{ 'lifepillar/pgsql.vim', ft = 'pgsql' },
{ 'MTDL9/vim-log-highlighting', ft = 'log' },
{ 'reasonml-editor/vim-reason-plus', ft = { 'reason', 'merlin' } },
{ 'vmchale/just-vim', ft = 'just' },
-----------------------------------------------------------------------------
{
'andymass/vim-matchup',
init = function()
vim.g.matchup_matchparen_offscreen = {}
end,
},
-----------------------------------------------------------------------------
{
'nvim-treesitter/nvim-treesitter',
event = { 'BufReadPost', 'BufNewFile' },
main = 'nvim-treesitter.configs',
build = ':TSUpdate',
dependencies = {
'nvim-treesitter/nvim-treesitter-textobjects',
{ 'nvim-treesitter/nvim-treesitter-context', opts = { enable = false } },
'JoosepAlviste/nvim-ts-context-commentstring',
'RRethy/nvim-treesitter-endwise',
'windwp/nvim-ts-autotag',
'andymass/vim-matchup',
},
cmd = {
'TSUpdate',
'TSInstall',
'TSInstallInfo',
'TSModuleInfo',
'TSConfigInfo',
'TSUpdateSync',
},
keys = {
{ 'v', desc = 'Increment selection', mode = 'x' },
{ 'V', desc = 'Shrink selection', mode = 'x' },
},
---@type TSConfig
---@diagnostic disable-next-line: missing-fields
opts = {
highlight = { enable = true },
indent = { enable = true },
refactor = {
highlight_definitions = { enable = true },
highlight_current_scope = { enable = true },
},
-- See: https://github.com/RRethy/nvim-treesitter-endwise
endwise = { enable = true },
-- See: https://github.com/andymass/vim-matchup
matchup = {
enable = true,
include_match_words = true,
},
-- See: https://github.com/windwp/nvim-ts-autotag
autotag = {
enable = true,
filetypes = {
'markdown',
'glimmer',
'handlebars',
'hbs',
'html',
'javascript',
'javascriptreact',
'jsx',
'rescript',
'svelte',
'tsx',
'typescript',
'typescriptreact',
'vue',
'xml',
},
},
-- See: https://github.com/JoosepAlviste/nvim-ts-context-commentstring
context_commentstring = { enable = true, enable_autocmd = false },
incremental_selection = {
enable = true,
keymaps = {
init_selection = false,
node_incremental = 'v',
scope_incremental = false,
node_decremental = 'V',
},
},
-- See: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
textobjects = {
select = {
enable = true,
lookahead = true,
keymaps = {
['af'] = '@function.outer',
['if'] = '@function.inner',
['ac'] = '@class.outer',
['ic'] = '@class.inner',
['a,'] = '@parameter.outer',
['i,'] = '@parameter.inner',
},
},
move = {
enable = true,
set_jumps = true,
goto_next_start = {
['],'] = '@parameter.inner',
},
goto_previous_start = {
['[,'] = '@parameter.inner',
},
},
swap = {
enable = true,
swap_next = {
['>,'] = '@parameter.inner',
},
swap_previous = {
['<,'] = '@parameter.inner',
},
},
},
-- https://github.com/nvim-treesitter/nvim-treesitter#supported-languages
ensure_installed = {
'bash',
'comment',
'css',
'cue',
'diff',
'fish',
'fennel',
'git_config',
'git_rebase',
'gitcommit',
'gitignore',
'gitattributes',
'graphql',
'hcl',
'html',
'http',
'java',
'javascript',
'jsdoc',
'kotlin',
'lua',
'luadoc',
'luap',
'make',
'markdown',
'markdown_inline',
'nix',
'perl',
'php',
'pug',
'regex',
'ruby',
'rust',
'scala',
'scss',
'sql',
'svelte',
'terraform',
'todotxt',
'toml',
'tsx',
'typescript',
'vim',
'vimdoc',
'vue',
'zig',
},
},
init = function ()
vim.opt.concealcursor = "nc"
vim.opt.conceallevel = 2
end
},
}

View File

@ -30,3 +30,41 @@ stdin
md md
regex101 regex101
#nglish #nglish
Manspider
Manspiders
subrace
subraces
swiftstride
beasthide
Eldeen
Khorvaire
drider
spiderful
spiderfew
Spiderfolk
Shrelluka
find/!
find
Magnam
arachna
matrem
namegen
Zessas
Webbington
Razu
Rhellu
cantrip
d12
d4
th
unnoteworthy
Qroczhreer
Blokhof
Hauck
spiderous
zlib
experimentelle
SHA
Etablierungs
the
strikethrough

Binary file not shown.