Allow shadowing pylsp/elixirls versions.

main
Joshua Potter 2023-11-20 15:44:04 -07:00
parent 6b1d507283
commit 85b82055d3
4 changed files with 4 additions and 9 deletions

View File

@ -18,6 +18,7 @@
gnumake gnumake
mullvad-vpn mullvad-vpn
python3 python3
unzip
wezterm wezterm
zotero zotero
]; ];

View File

@ -3,10 +3,6 @@
programs.neovim = { programs.neovim = {
nvim-lspconfig = '' nvim-lspconfig = ''
require('init.lsp').setup(require('lspconfig').elixirls) { require('init.lsp').setup(require('lspconfig').elixirls) {
-- Keep command relative. Compatibility of `elixir-ls` depends tightly
-- on -- the version of elixir being used so this allows local (i.e.
-- within nix shells) versions of `elixir-ls` to override the version
-- specified -- in `extraPackages`.
cmd = { 'elixir-ls' }, cmd = { 'elixir-ls' },
} }
''; '';

View File

@ -12,9 +12,7 @@ in
{ {
programs.neovim = { programs.neovim = {
nvim-dap = '' nvim-dap = ''
require('init.python').nvim_dap({ require('init.python').nvim_dap()
command = '${venv}/bin/python3.10',
})
''; '';
nvim-lspconfig = '' nvim-lspconfig = ''

View File

@ -1,13 +1,13 @@
local M = {} local M = {}
function M.nvim_dap(options) function M.nvim_dap()
local dap = require('dap') local dap = require('dap')
dap.adapters.python = function(callback, config) dap.adapters.python = function(callback, config)
callback({ callback({
name = 'debugpy', name = 'debugpy',
type = 'executable', type = 'executable',
command = options.command, command = 'python3',
args = { '-m', 'debugpy.adapter' }, args = { '-m', 'debugpy.adapter' },
options = { options = {
source_filetype = 'python', source_filetype = 'python',