About
Seamless integration with Django commands and shell within Neovim. This plugin leverages the power of Telescope to offer an intuitive interface for executing Django commands and running Django shell code directly from your Neovim editor.
Features
-
Django Commands
Easily list, view help, and see examples for Django commands directly in a Telescope prompt.
-
Django Shell
Execute Django code and view the results in a new vertical buffer for better readability and debugging.
https://github.com/user-attachments/assets/f50e4c30-04b7-40ad-b532-abc1753e932d
Install
If you are using Lazy nvim
{
"shtayeb/django-shell.nvim",
opts = {},
dependencies = { "nvim-telescope/telescope.nvim" }
}
Keymaps
Create a .py
file for testing. write the code to be executed in that file and:
vim.keymap.set("n", "<space>tc", "<cmd>DjangoCommands<CR>")
vim.keymap.set("n", "<space>tr", "<cmd>DjangoShellExec<CR>")
vim.keymap.set("n", "<space>tx", "<cmd>DjangoShellReset<CR>")
Default Keymaps
- Run django code in the current buffer
<leader>tr