diff --git a/init.lua b/init.lua index da5cfaa..34ffeeb 100644 --- a/init.lua +++ b/init.lua @@ -10,6 +10,7 @@ require('lazy').setup(vim.tbl_extend('keep', config.user_lazy_opts(), { { import = 'plex.plugins' }, { import = 'plex.plugins.extras.ui' }, { import = 'plex.plugins.extras.treesitter' }, + { import = 'plex.plugins.extras.formatting' }, { import = 'plex.plugins.extras.editor' }, { import = 'plex.plugins.extras.lang.json' }, { import = 'plex.plugins.extras.lang.python' }, diff --git a/lua/plex/config/keymaps.lua b/lua/plex/config/keymaps.lua index 674cba0..42ec1d0 100644 --- a/lua/plex/config/keymaps.lua +++ b/lua/plex/config/keymaps.lua @@ -57,10 +57,10 @@ map('n', '', 'lnext', { desc = 'Next Loclist Item' }) map('n', '', 'lprev', { desc = 'Previous Loclist Item' }) -- go to next diagnostics entry -map('n', '', function () +map('n', 'cj', function () vim.diagnostic.goto_next() end, { desc = 'go to next diagnostic'}) -map('n', '', function () +map('n', 'ck', function () vim.diagnostic.goto_prev() end, { desc = 'go to last diagnostic'}) diff --git a/lua/plex/plugins/coding.lua b/lua/plex/plugins/coding.lua index 7ad2a80..b534fa6 100644 --- a/lua/plex/plugins/coding.lua +++ b/lua/plex/plugins/coding.lua @@ -198,19 +198,20 @@ return { ----------------------------------------------------------------------------- { 'echasnovski/mini.surround', + enabled = false, -- stylua: ignore keys = function(_, keys) -- Populate the keys based on the user's options local plugin = require('lazy.core.config').spec.plugins['mini.surround'] local opts = require('lazy.core.plugin').values(plugin, 'opts', false) local mappings = { - { opts.mappings.add, desc = 'Add surrounding', mode = { 'n', 'x' } }, - { opts.mappings.delete, desc = 'Delete surrounding' }, - { opts.mappings.find, desc = 'Find right surrounding' }, - { opts.mappings.find_left, desc = 'Find left surrounding' }, - { opts.mappings.highlight, desc = 'Highlight surrounding' }, - { opts.mappings.replace, desc = 'Replace surrounding' }, - { opts.mappings.update_n_lines, desc = 'Update `MiniSurround.config.n_lines`' }, + { opts.mappings.add, desc = 'Add surrounding', mode = { 'n', 'x', 'v' } }, + { opts.mappings.delete, desc = 'Delete surrounding', mode = { 'n', 'x', 'v' } }, + { opts.mappings.find, desc = 'Find right surrounding', mode = { 'n', 'x', 'v' } }, + { opts.mappings.find_left, desc = 'Find left surrounding', mode = { 'n', 'x', 'v' } }, + { opts.mappings.highlight, desc = 'Highlight surrounding', mode = { 'n', 'x', 'v' } }, + { opts.mappings.replace, desc = 'Replace surrounding', mode = { 'n', 'x', 'v' } }, + { opts.mappings.update_n_lines, desc = 'Update `MiniSurround.config.n_lines`', mode = { 'n', 'x', 'v' } }, } mappings = vim.tbl_filter(function(m) return m[1] and #m[1] > 0 @@ -220,12 +221,12 @@ return { opts = { mappings = { add = 'sa', -- Add surrounding in Normal and Visual modes - delete = 'ds', -- Delete surrounding - find = 'gzf', -- Find surrounding (to the right) - find_left = 'gzF', -- Find surrounding (to the left) - highlight = 'gzh', -- Highlight surrounding - replace = 'cs', -- Replace surrounding - update_n_lines = 'gzn', -- Update `n_lines` + delete = 'sd', -- Delete surrounding + find = 'sf', -- Find surrounding (to the right) + find_left = 'sF', -- Find surrounding (to the left) + highlight = 'sh', -- Highlight surrounding + replace = 'cs', -- Replace surrounding + update_n_lines = 'su', -- Update `n_lines` }, }, }, diff --git a/lua/plex/plugins/editor.lua b/lua/plex/plugins/editor.lua index c1a0f6e..f0fdf65 100644 --- a/lua/plex/plugins/editor.lua +++ b/lua/plex/plugins/editor.lua @@ -191,7 +191,7 @@ return { keys = { { 'gl', '(leap-forward-to)', mode = { 'n', 'x', 'o' }, desc = 'Leap forward to' }, { 'gL', '(leap-backward-to)', mode = { 'n', 'x', 'o' }, desc = 'Leap backward to' }, - { 'wl', '(leap-from-window)', mode = { 'n', 'x', 'o' }, desc = 'Leap to windows' }, + { 'wgl', '(leap-from-window)', mode = { 'n', 'x', 'o' }, desc = 'Leap to windows' }, }, config = function () local leap = require('leap') diff --git a/lua/plex/plugins/extras/coding/sandwich.lua b/lua/plex/plugins/extras/coding/sandwich.lua index 29c14eb..716b8c9 100644 --- a/lua/plex/plugins/extras/coding/sandwich.lua +++ b/lua/plex/plugins/extras/coding/sandwich.lua @@ -11,8 +11,8 @@ return { { 'sc', '(operator-sandwich-replace)(operator-sandwich-release-count)(textobj-sandwich-query-a)', silent = true }, { 'ssc', '(operator-sandwich-replace)(operator-sandwich-release-count)(textobj-sandwich-auto-a)', silent = true }, { 'sa', '(operator-sandwich-add)', silent = true, mode = { 'n', 'x', 'o' }}, - { 'ir', '(textobj-sandwich-auto-i)', silent = true, mode = { 'x', 'o' }}, - { 'ab', '(textobj-sandwich-auto-a)', silent = true, mode = { 'x', 'o' }}, + { 'si', '(textobj-sandwich-auto-i)', silent = true, mode = { 'x', 'o' }}, + { 'sa', '(textobj-sandwich-auto-a)', silent = true, mode = { 'x', 'o' }}, }, init = function() vim.g.sandwich_no_default_key_mappings = 1 diff --git a/lua/plex/plugins/extras/formatting/prettier.lua b/lua/plex/plugins/extras/formatting/prettier.lua index dbbeba8..8f85e74 100644 --- a/lua/plex/plugins/extras/formatting/prettier.lua +++ b/lua/plex/plugins/extras/formatting/prettier.lua @@ -4,32 +4,49 @@ return { { - 'williamboman/mason.nvim', + "williamboman/mason.nvim", opts = function(_, opts) - if type(opts.ensure_installed) == 'table' then - table.insert(opts.ensure_installed, 'prettierd') + if type(opts.ensure_installed) == "table" then + table.insert(opts.ensure_installed, "prettierd") end end, }, { - 'mhartington/formatter.nvim', + "mhartington/formatter.nvim", optional = true, + keys = { + { "ff", "Format", desc = "Use Formatter" }, + }, opts = function(_, opts) opts = opts or {} local filetypes = { -- FIXME:add more filetypes - json = { require('formatter.defaults.prettierd') }, + json = { require("formatter.defaults.prettierd") }, + rust = { + rustfmt = function() + return { + exe = "rustfmt", + args = { "--emit=std ut" }, + stdin = true, + } + end, + }, + ["*"] = { + -- "formatter.filetypes.any" defines default configurations for any + -- filetype + require("formatter.filetypes.any").remove_trailing_whitespace, + }, } - opts.filetype = vim.tbl_extend('keep', opts.filetype or {}, filetypes) + opts.filetype = vim.tbl_extend("keep", opts.filetype or {}, filetypes) end, }, { - 'jose-elias-alvarez/null-ls.nvim', + "jose-elias-alvarez/null-ls.nvim", optional = true, opts = function(_, opts) - local nls = require('null-ls') + local nls = require("null-ls") table.insert(opts.sources, nls.builtins.formatting.prettierd) end, }, diff --git a/lua/plex/plugins/extras/lang/tex.lua b/lua/plex/plugins/extras/lang/tex.lua new file mode 100644 index 0000000..e9b017b --- /dev/null +++ b/lua/plex/plugins/extras/lang/tex.lua @@ -0,0 +1,28 @@ +return { + + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "rust" }) + end + end, + }, + + { + "neovim/nvim-lspconfig", + -- dependencies = { 'b0o/SchemaStore.nvim', version = false }, + opts = { + servers = { + texlab = { + rootDirectory = ".", + auxDirectory = ".", + latexFormatter = "latexindent", + latexindent = { + modifyLineBreaks = true, + }, + }, + }, + }, + }, +} diff --git a/lua/plex/plugins/extras/ui/dashboard.lua b/lua/plex/plugins/extras/ui/dashboard.lua index 49601fa..f2c746c 100644 --- a/lua/plex/plugins/extras/ui/dashboard.lua +++ b/lua/plex/plugins/extras/ui/dashboard.lua @@ -2,16 +2,16 @@ local function get_header() -- see https://github.com/MaximilianLloyd/ascii.nvim return { -- The following is a customized version! - [[ ]], - [[ ██ ]], - [[ █ ███████ █████ ██ ]], - [[ ███ █████ █████  ]], - [[ █████ ███ ███████████████████ ███ ███████████ ]], - [[ ██ ██ █ ███ █████████████ █████ ██████████████ ]], - [[ ████ ████ ██████████ █████████ █████ █████ ████ █████ ]], - [[ ██████ ██ ███ ███ █████████ █████ █████ ████ █████ ]], - [[ ████████  ██████████████████ ████ █████ █████ ████ ██████ ]], - [[ ]], + [[ ]], + [[ ]], + [[ █ ████████ █████ ███████ ████ ]], + [[ ███ ██████ █████ █████████ ██████ ]], + [[ █████ ██████████████████████ ████ ███████████████ ]], + [[ ██ ██ █████ █████████████ ████ ████████████████ ]], + [[ ████ ███████████████ █████████ ████ █████ ██████ ████ ]], + [[ ██████ ██████ ███ █████████ ████ █████ █████ ████ ]], + [[ ████████ ███████████████████ ████ ████ █████ ████ ████ ]], + [[ ]], } end diff --git a/lua/plex/plugins/lsp/init.lua b/lua/plex/plugins/lsp/init.lua index c27fce8..a2fc277 100644 --- a/lua/plex/plugins/lsp/init.lua +++ b/lua/plex/plugins/lsp/init.lua @@ -74,6 +74,9 @@ return { }, }, }, + texlab = { + + } }, -- you can do any additional lsp server setup here -- return true if you don't want this server to be setup with lspconfig @@ -243,7 +246,13 @@ return { build = ':MasonUpdate', keys = { { 'mm', 'Mason', desc = 'Mason' } }, opts = { - ensure_installed = {}, + ensure_installed = { + 'rust-analyzer', + 'clangd', + 'pyright', + 'bash-language-server', + 'codelldb', + }, ui = { border = 'rounded', }, diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index 27bfabd..88efa18 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -68,3 +68,43 @@ SHA Etablierungs the strikethrough +RustBook +IEC62443 +DHBW +gelinked +openssl +Yocto +gls +ECC +Kryptosystem +github +sfackler +mathmatics +www +sagemath +PlexSheep +plexcryptool +ECDSA +EdDSA +Stringverarbeitung +#onblocking +OOP +Fifo +serde +Deserialisierung +serde +Skripte +mathmatics +bbc +Kryptographischen/! +PyO3 +#yo3 +JSON +json +#yo3 +Verifikationsmechanismus +projektinterne +Theoriephase +weise/! +Weise +merksam