add with configuration for python
This commit is contained in:
parent
3745d242ba
commit
ae6f1fbd81
21
README.md
21
README.md
|
@ -1,7 +1,26 @@
|
||||||
# kickstart.nvim
|
# swl_kickstart.nvim
|
||||||
|
|
||||||
|
Instructions unique to my dotfiles:
|
||||||
|
- create a symlink in $HOME/.config/
|
||||||
|
`ln -s /Users/<username>/src/swl_kickstart.nvim /Users/<username>/.config/`
|
||||||
|
- launch with `knv`
|
||||||
|
|
||||||
https://github.com/kdheepak/kickstart.nvim/assets/1813121/f3ff9a2b-c31f-44df-a4fa-8a0d7b17cf7b
|
https://github.com/kdheepak/kickstart.nvim/assets/1813121/f3ff9a2b-c31f-44df-a4fa-8a0d7b17cf7b
|
||||||
|
|
||||||
|
## nvim-dap, nvim-dap-python
|
||||||
|
|
||||||
|
### set up a virtual env for debugpy requirement as suggested
|
||||||
|
|
||||||
|
mkdir .virtualenvs
|
||||||
|
cd .virtualenvs
|
||||||
|
python -m venv debugpy
|
||||||
|
debugpy/bin/python -m pip install debugpy
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Introduction
|
### Introduction
|
||||||
|
|
||||||
A starting point for Neovim that is:
|
A starting point for Neovim that is:
|
||||||
|
|
49
init.lua
49
init.lua
|
@ -254,6 +254,24 @@ require('lazy').setup({
|
||||||
build = ':TSUpdate',
|
build = ':TSUpdate',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
-- Debug Adapter Protocol client
|
||||||
|
'mfussenegger/nvim-dap',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-- python specific debugger
|
||||||
|
'mfussenegger/nvim-dap-python',
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
-- DAP UI
|
||||||
|
'rcarriga/nvim-dap-ui',
|
||||||
|
dependencies = {
|
||||||
|
'mfussenegger/nvim-dap'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
|
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
|
||||||
-- These are some example plugins that I've included in the kickstart repository.
|
-- These are some example plugins that I've included in the kickstart repository.
|
||||||
-- Uncomment any of the lines below to enable them.
|
-- Uncomment any of the lines below to enable them.
|
||||||
|
@ -586,7 +604,11 @@ local servers = {
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Setup neovim lua configuration
|
-- Setup neovim lua configuration
|
||||||
require('neodev').setup()
|
-- enable type checking for nvim-dap-ui to get type checking, documentation and autocompletion
|
||||||
|
-- for all API functions
|
||||||
|
require('neodev').setup({
|
||||||
|
library = { plugins = { "nvim-dap-ui" }, types = true },
|
||||||
|
})
|
||||||
|
|
||||||
-- nvim-cmp supports additional completion capabilities, so broadcast that to servers
|
-- nvim-cmp supports additional completion capabilities, so broadcast that to servers
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
@ -662,5 +684,30 @@ cmp.setup {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- python debugger
|
||||||
|
require('dap-python').setup('/Users/stephenleece/.asdf/shims/python')
|
||||||
|
-- require('dap-python').test_runner = "pytest"
|
||||||
|
|
||||||
|
-- configure dap ui
|
||||||
|
local dap, dapui = require("dap"), require("dapui")
|
||||||
|
dapui.setup()
|
||||||
|
dap.listeners.after.event_initialized["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
|
||||||
|
vim.fn.sign_define('DapBreakpoint',{ text ='🟥', texthl ='', linehl ='', numhl =''})
|
||||||
|
vim.fn.sign_define('DapStopped',{ text ='▶️', texthl ='', linehl ='', numhl =''})
|
||||||
|
vim.keymap.set('n', '<F5>', require 'dap'.continue)
|
||||||
|
vim.keymap.set('n', '<F10>', require 'dap'.step_over)
|
||||||
|
vim.keymap.set('n', '<F11>', require 'dap'.step_into)
|
||||||
|
vim.keymap.set('n', '<F12>', require 'dap'.step_out)
|
||||||
|
vim.keymap.set('n', '<leader>b', require 'dap'.toggle_breakpoint)
|
||||||
|
|
||||||
|
|
||||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
|
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
|
||||||
"LuaSnip": { "branch": "master", "commit": "cab667e2674881001a86a7478fff7dc7791c63f5" },
|
"LuaSnip": { "branch": "master", "commit": "cab667e2674881001a86a7478fff7dc7791c63f5" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
||||||
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||||
"fidget.nvim": { "branch": "main", "commit": "a1493d94ecb3464ab3ae4d5855765310566dace4" },
|
"fidget.nvim": { "branch": "main", "commit": "a1493d94ecb3464ab3ae4d5855765310566dace4" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
|
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
|
||||||
|
@ -13,6 +14,9 @@
|
||||||
"mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" },
|
"mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" },
|
||||||
"neodev.nvim": { "branch": "main", "commit": "f972d7e6cd21b691199565cfe3e6487e774a4e8f" },
|
"neodev.nvim": { "branch": "main", "commit": "f972d7e6cd21b691199565cfe3e6487e774a4e8f" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" },
|
"nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" },
|
||||||
|
"nvim-dap": { "branch": "master", "commit": "f0dca670fa059eb89dda8869a6310c804241345c" },
|
||||||
|
"nvim-dap-python": { "branch": "master", "commit": "091e4ae00a12085f9ed4200a3cd04af7179b8a23" },
|
||||||
|
"nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "553c4e0e667167640c5398573f6f3a488ff8047a" },
|
"nvim-lspconfig": { "branch": "master", "commit": "553c4e0e667167640c5398573f6f3a488ff8047a" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "649d137371e9214d30b20565e0574824fa3a3670" },
|
"nvim-treesitter": { "branch": "master", "commit": "649d137371e9214d30b20565e0574824fa3a3670" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "dbcd9388e3b119a87c785e10a00d62876077d23d" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "dbcd9388e3b119a87c785e10a00d62876077d23d" },
|
||||||
|
|
Loading…
Reference in New Issue