From 89e617a3f6a5ca4ef8165c424d07f5f40ac54613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Thu, 13 Oct 2022 12:35:24 +0200 Subject: [PATCH] Add plantuml-previewer, config up to date with AstroNvim, add TODO to README --- README.md | 1 + init.lua | 50 ++++++++++++++++++++++++++++++-------------------- 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 16845d7..e158509 100644 --- a/README.md +++ b/README.md @@ -147,3 +147,4 @@ There are also some [VSCode like keybinds setup by the plugin](https://github.co branch's [`README.md`](https://github.com/jiriks74/astronvim_config/blob/neovim7.2/README.md) it user has Neovim < 8.0 - [ ] Add `.vimspector.json` template - [ ] Setting up simple wiki? +- [ ] Add section for ["weirongxu/plantuml-previewer.vim"](https://github.com/weirongxu/plantuml-previewer.vim) diff --git a/init.lua b/init.lua index 5121b3e..b51b90f 100644 --- a/init.lua +++ b/init.lua @@ -30,7 +30,10 @@ local config = { -- Add highlight groups in any theme highlights = { - -- duskfox = { -- a table of overrides/changes to the default + -- init = { -- this table overrides highlights in all themes + -- Normal = { bg = "#000000" }, + -- } + -- duskfox = { -- a table of overrides/changes to the duskfox theme -- Normal = { bg = "#000000" }, -- }, }, @@ -41,11 +44,9 @@ local config = { -- set to true or false etc. relativenumber = true, -- sets vim.opt.relativenumber number = true, -- sets vim.opt.number - spell = true, -- sets vim.opt.spell + spell = false, -- sets vim.opt.spell signcolumn = "auto", -- sets vim.opt.signcolumn to auto wrap = false, -- sets vim.opt.wrap - foldexpr = "nvim_treesitter#foldexpr()", -- set Treesitter based folding - foldmethod = "expr", }, g = { mapleader = " ", -- sets vim.g.mapleader @@ -135,16 +136,12 @@ local config = { -- Extend LSP configuration lsp = { - on_attach = function(client, bufnr) - if client.server_capabilities.documentFormattingProvider then - vim.api.nvim_del_augroup_by_name "auto_format" - end - end, -- enable servers that you already have installed without mason servers = { -- "pyright" }, formatting = { + format_on_save = false, -- enable or disable auto formatting on save disabled = { -- disable formatting capabilities for the listed clients -- "sumneko_lua", }, @@ -211,14 +208,17 @@ local config = { ["dr"] = { "call vimspector#Restart()", desc = "Restart" }, ["dR"] = { "call vimspector#RunToCursor()", desc = "Run to cursor" }, ["dC"] = { "call vimspector#GoToCurrentLine()", desc = "Go to current line" }, - ["dP"] = { "call vimspector#JumpToProgramCounter()", desc = "Move Cursor to the program counter in current frame" }, + ["dP"] = { "call vimspector#JumpToProgramCounter()", + desc = "Move Cursor to the program counter in current frame" }, -- Breakpoints ["dbt"] = { "call vimspector#ToggleBreakpoint()", desc = "Toggle breakpoint" }, ["dbl"] = { "call vimspector#ListBreakpoints()", desc = "List breakpoints" }, ["dbc"] = { "call vimspector#ClearBreakpoints()", desc = "Clear breakpoints" }, - ["dbC"] = { "call vimspector#ToggleBreakpoint( { trigger expr, hit count expr } )", desc = "Toggle CBreakpoint or LogPoint on current line"}, - ["dbf"] = { "call vimspector#AddFunctionBreakpoint( '' )", desc = "Add a function breakpoint for expression under cursor"}, + ["dbC"] = { "call vimspector#ToggleBreakpoint( { trigger expr, hit count expr } )", + desc = "Toggle CBreakpoint or LogPoint on current line" }, + ["dbf"] = { "call vimspector#AddFunctionBreakpoint( '' )", + desc = "Add a function breakpoint for expression under cursor" }, ["dbn"] = { "call vimspector#JumpToNextBreakpoint()", desc = "Jump to next breakpoint" }, ["dbp"] = { "call vimspector#JumpToPreviousBreakpoint()", desc = "Jump to previous breakpoint" }, @@ -292,10 +292,10 @@ local config = { -- end, -- }, -- - {"github/copilot.vim"}, - {"puremourning/vimspector"}, - {"lervag/vimtex"}, - {"jiriks74/vim-pio"}, + { "github/copilot.vim" }, + { "puremourning/vimspector" }, + { "lervag/vimtex" }, + { "jiriks74/vim-pio" }, { "iamcco/markdown-preview.nvim", run = function() vim.fn["mkdp#util#install"]() end, @@ -306,7 +306,9 @@ local config = { require("auto-save").setup() end, }, - + { "weirongxu/plantuml-previewer.vim" }, + { "aklt/plantuml-syntax" }, + { "tyru/open-browser.vim" }, -- We also support a key value style plugin definition similar to NvChad: -- ["ray-x/lsp_signature.nvim"] = { @@ -315,6 +317,13 @@ local config = { -- require("lsp_signature").setup() -- end, -- }, + -- ["weirongxu/plantuml-previewer.vim"] = { + -- requires = { {"aklt/plantuml-syntax"} }, + -- -- depends = "aklt/plantuml-syntax", + -- requires = { {"tyru/open-browser.vim"} }, + -- -- depends = "tyru/open-browser.vim", + -- }, + }, -- All other entries override the require("").setup({...}) call for default plugins ["null-ls"] = function(config) -- overrides `require("null-ls").setup(config)` @@ -338,8 +347,8 @@ local config = { ["mason-lspconfig"] = { -- overrides `require("mason-lspconfig").setup(...)` -- ensure_installed = { "sumneko_lua" }, }, - -- use mason-tool-installer to configure DAP/Formatters/Linter installation - ["mason-tool-installer"] = { -- overrides `require("mason-tool-installer").setup(...)` + -- use mason-null-ls to configure Formatters/Linter installation for null-ls sources + ["mason-null-ls"] = { -- overrides `require("mason-null-ls").setup(...)` -- ensure_installed = { "prettier", "stylua" }, }, }, @@ -380,7 +389,7 @@ local config = { -- third key is the key to bring up next level and its displayed -- group name in which-key top level menu ["b"] = { name = "Buffer" }, - ["d"] = { + ["d"] = { name = "Debugging", ["b"] = { name = "Breakpoints" }, ["s"] = { name = "Step" }, @@ -416,6 +425,7 @@ local config = { require("alpha").start(true) end end + vim.keymap.del("n", "c") if require("core.utils").is_available "bufdelete.nvim" then vim.keymap.set("n", "c", function()