From 5c5b92ebf003a56591222c422749bdb33009846a Mon Sep 17 00:00:00 2001 From: Maciej Lebiest Date: Wed, 23 Oct 2024 13:31:58 +0200 Subject: [PATCH] some cleaning --- Containerfile | 3 +- README.md | 11 ------ lua/lazy-load.lua | 16 +------- lua/plugins/codewindow.lua | 14 ------- lua/plugins/neodev.lua | 7 ---- lua/plugins/nvim-dap.lua | 77 -------------------------------------- 6 files changed, 3 insertions(+), 125 deletions(-) delete mode 100644 lua/plugins/codewindow.lua delete mode 100644 lua/plugins/neodev.lua delete mode 100644 lua/plugins/nvim-dap.lua diff --git a/Containerfile b/Containerfile index 92d9b2e..d98be8d 100644 --- a/Containerfile +++ b/Containerfile @@ -43,8 +43,7 @@ ENV MASON_PKGS=" \ yaml-language-server \ markdownlint \ ansible-language-server \ - ansible-lint \ - debugpy" + ansible-lint" ENV MASON_PKGS_NO_ARM="lemminx helm-ls lua-language-server" diff --git a/README.md b/README.md index 7ec48a9..918ebc1 100644 --- a/README.md +++ b/README.md @@ -262,21 +262,10 @@ All that is saved in image, so that is why image is so heavy. |\l|disable (search) highlighting| |\cb|Close all buffers (:bufdo bd)| -#### DAP - Debug Adapter Protocol - -|keys|action| -|----|----| -|\ d b|set breakpoint| -|\ d c|launch/continue| -|\ d g|toggle dap UI| - #### Opened files navigation |keys|action| |----|----| -|\ m m| open minimap| -|\ m c | close minimap| -|\ m f | focus minimap| |Ctrl w w| Move to next splitted frame| |Ctrl w \ | moving throught splitted frame| |Ctrl w c | close split| diff --git a/lua/lazy-load.lua b/lua/lazy-load.lua index 6256d50..a39d8f3 100644 --- a/lua/lazy-load.lua +++ b/lua/lazy-load.lua @@ -1,5 +1,4 @@ require("lazy").setup({ - { 'mracos/mermaid.vim' }, -- Nvim-tree stuff { 'nvim-tree/nvim-web-devicons' }, -- optional, for file icons { @@ -18,13 +17,7 @@ require("lazy").setup({ }, -- neovim lsp plugins and depencencies { - "rcarriga/nvim-dap-ui", - dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio", "theHamsta/nvim-dap-virtual-text" }, - config = require('plugins.nvim-dap').init - }, - { - "folke/neodev.nvim", - config = require('plugins.neodev').init + "folke/lazydev.nvim", }, { 'hrsh7th/cmp-nvim-lsp' }, { 'hrsh7th/cmp-buffer' }, @@ -93,11 +86,6 @@ require("lazy").setup({ version = '*', opts = require('plugins.bufferline').config }, - { - 'gorbit99/codewindow.nvim', - opts = require('plugins.codewindow').config, - init = require('plugins.codewindow').build - }, { 'preservim/nerdcommenter', keys = require('plugins.nerdcommenter').keys @@ -145,7 +133,7 @@ require("lazy").setup({ name = 'render-markdown', -- Only needed if you have another plugin named markdown.nvim --dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins - dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons + dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons }, { 'nvim-lualine/lualine.nvim', diff --git a/lua/plugins/codewindow.lua b/lua/plugins/codewindow.lua deleted file mode 100644 index 6be2004..0000000 --- a/lua/plugins/codewindow.lua +++ /dev/null @@ -1,14 +0,0 @@ -return { - config = { - minimap_width = 20, -- The width of the text part of the minimap - width_multiplier = 4, -- How many characters one dot represents - use_lsp = true, -- Use the builtin LSP to show errors and warnings - use_treesitter = true, -- Use nvim-treesitter to highlight the code - show_cursor = true, - exclude_filetypes = {}, -- Choose certain filetypes to not show minimap on - z_index = 1, -- The z-index the floating window will be on - }, - build = function () - require("codewindow").apply_default_keybinds() - end -} diff --git a/lua/plugins/neodev.lua b/lua/plugins/neodev.lua deleted file mode 100644 index 8185848..0000000 --- a/lua/plugins/neodev.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - init = function() - require("neodev").setup({ - library = { plugins = { "nvim-dap-ui" }, types = true }, - }) - end -} diff --git a/lua/plugins/nvim-dap.lua b/lua/plugins/nvim-dap.lua deleted file mode 100644 index 66b9a47..0000000 --- a/lua/plugins/nvim-dap.lua +++ /dev/null @@ -1,77 +0,0 @@ -return { - init = function() - local dap = require('dap') - -- configurations - dap.configurations.python = { - { - type = 'python', - request = 'launch', - name = "Launch file", - program = "${file}", - pythonPath = function() - return '/usr/bin/python' - end, - }, - } - - -- adapters - dap.adapters.python = { - type = 'executable', - command = '/root/.local/share/nvim/mason/packages/debugpy/venv/bin/python', - args = { '-m', 'debugpy.adapter' }, - --args = { '-m', 'debugpy.adapter' }, - } - - -- setup dapui - local dapui = require("dapui") - dapui.setup() - - 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 - - -- setup dap virtual text - require("nvim-dap-virtual-text").setup { - enabled = true, -- enable this plugin (the default) - enabled_commands = true, -- create commands DapVirtualTextEnable, DapVirtualTextDisable, DapVirtualTextToggle, (DapVirtualTextForceRefresh for refreshing when debug adapter did not notify its termination) - highlight_changed_variables = true, -- highlight changed values with NvimDapVirtualTextChanged, else always NvimDapVirtualText - highlight_new_as_changed = false, -- highlight new variables in the same way as changed variables (if highlight_changed_variables) - show_stop_reason = true, -- show stop reason when stopped for exceptions - commented = false, -- prefix virtual text with comment string - only_first_definition = true, -- only show virtual text at first definition (if there are multiple) - all_references = false, -- show virtual text on all all references of the variable (not only definitions) - clear_on_continue = false, -- clear virtual text on "continue" (might cause flickering when stepping) - --- A callback that determines how a variable is displayed or whether it should be omitted - --- @param variable Variable https://microsoft.github.io/debug-adapter-protocol/specification#Types_Variable - --- @param buf number - --- @param stackframe dap.StackFrame https://microsoft.github.io/debug-adapter-protocol/specification#Types_StackFrame - --- @param node userdata tree-sitter node identified as variable definition of reference (see `:h tsnode`) - --- @param options nvim_dap_virtual_text_options Current options for nvim-dap-virtual-text - --- @return string|nil A text how the virtual text should be displayed or nil, if this variable shouldn't be displayed - display_callback = function(variable, buf, stackframe, node, options) - if options.virt_text_pos == 'inline' then - return ' = ' .. variable.value - else - return variable.name .. ' = ' .. variable.value - end - end, - -- position of virtual text, see `:h nvim_buf_set_extmark()`, default tries to inline the virtual text. Use 'eol' to set to end of line - virt_text_pos = vim.fn.has 'nvim-0.10' == 1 and 'inline' or 'eol', - - -- experimental features: - all_frames = false, -- show virtual text for all stack frames not only current. Only works for debugpy on my machine. - virt_lines = false, -- show virtual lines instead of virtual text (will flicker!) - virt_text_win_col = nil -- position the virtual text at a fixed window column (starting from the first text column) , - -- e.g. 80 to position at column 80, see `:h nvim_buf_set_extmark()` - } - end -}