From f8d2160bbfb9a9e74bbd9d88a3b801fe8418b8e3 Mon Sep 17 00:00:00 2001 From: Garrett Andreson Date: Fri, 10 May 2024 13:26:45 -0600 Subject: [PATCH] Adding python --- init.lua | 22 ++++++++++++++-------- lua/kickstart/plugins/debug.lua | 11 +++-------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/init.lua b/init.lua index 88658ef3..bb6ce94a 100644 --- a/init.lua +++ b/init.lua @@ -564,10 +564,11 @@ require('lazy').setup({ -- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features. -- - settings (table): Override the default settings passed when initializing the server. -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ + -- -Add more langauge lsps here see https://github.com/williamboman/mason-lspconfig.nvim?tab=readme-ov-file#available-lsp-servers for details local servers = { -- clangd = {}, -- gopls = {}, - -- pyright = {}, + pyright = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- @@ -792,6 +793,9 @@ require('lazy').setup({ }, -- Highlight todo, notes, etc in comments + -- TODO: + -- FIXME + -- NOTE { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, { -- Collection of various small independent plugins/modules @@ -801,8 +805,7 @@ require('lazy').setup({ -- -- Examples: -- - va) - [V]isually select [A]round [)]paren - -- - yinq - [Y]ank [I]nside [N]ext [']quote - -- - ci' - [C]hange [I]nside [']quote + -- - yinq - [Y]ank [I]nside [N]ext ['' - [C]hange [I]nside [']quote require('mini.ai').setup { n_lines = 500 } -- Add/delete/replace surroundings (brackets, quotes, etc.) @@ -835,7 +838,7 @@ require('lazy').setup({ 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate', opts = { - ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc' }, + ensure_installed = { 'bash', 'c', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc', 'python' }, -- Autoinstall languages that are not installed auto_install = true, highlight = { @@ -873,11 +876,11 @@ require('lazy').setup({ -- Here are some example plugins that I've included in the Kickstart repository. -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- - -- require 'kickstart.plugins.debug', - -- require 'kickstart.plugins.indent_line', + --require 'kickstart.plugins.debug', + require 'kickstart.plugins.indent_line', -- require 'kickstart.plugins.lint', - -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', + require 'kickstart.plugins.autopairs', + require 'kickstart.plugins.neo-tree', -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` @@ -886,6 +889,9 @@ require('lazy').setup({ -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` -- { import = 'custom.plugins' }, + require 'custom.plugins.nvim-dap-ui', + require 'custom.plugins.nvim-dap-python', + require 'custom.plugins.nvim-dap-virtual-text', }, { ui = { -- If you are using a Nerd Font: set icons to an empty table which will use the diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua index 31dfecf5..5090329c 100644 --- a/lua/kickstart/plugins/debug.lua +++ b/lua/kickstart/plugins/debug.lua @@ -31,7 +31,7 @@ return { require('mason-nvim-dap').setup { -- Makes a best effort to setup the various debuggers with -- reasonable debug configurations - automatic_installation = true, + automatic_setup = true, -- You can provide additional configuration to the handlers, -- see mason-nvim-dap README for more information @@ -42,6 +42,7 @@ return { ensure_installed = { -- Update this to ensure that you have the debuggers for the langs you want 'delve', + 'debugpy', }, } @@ -85,12 +86,6 @@ return { dap.listeners.before.event_exited['dapui_config'] = dapui.close -- Install golang specific config - require('dap-go').setup { - delve = { - -- On Windows delve must be run attached or it crashes. - -- See https://github.com/leoluz/nvim-dap-go/blob/main/README.md#configuring - detached = vim.fn.has 'win32' == 0, - }, - } + require('dap-go').setup() end, }