From 164162c72c529c3bc4219a59fff21daa3c6841ea Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sun, 5 Dec 2021 16:46:49 +0100 Subject: Added distant.nvim and magma nvim plugins --- config/nvim/lua/plugins.lua | 47 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 8 deletions(-) (limited to 'config/nvim/lua/plugins.lua') diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index 7124738..3a365e3 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -11,14 +11,14 @@ return require('packer').startup(function() -- nvim lsp configuration use { 'neovim/nvim-lspconfig', - -- ft = {'rust', 'python', 'c', 'cpp'}, - -- config = function() - -- local lspconfig = require('lspconfig') - -- lspconfig.clangd.setup {} - -- -- need python-lsp-server and pyls-flake8 - -- lspconfig.pylsp.setup {} - -- -- lspconfig.rust_analyser.setup {} - -- end, + ft = {'rust', 'python', 'c', 'cpp'}, + config = function() + local lspconfig = require('lspconfig') + lspconfig.clangd.setup {} + -- need python-lsp-server and pyls-flake8 + lspconfig.pylsp.setup {} + -- lspconfig.rust_analyser.setup {} + end, } -- rust lsp (needs rust-analyser) @@ -118,6 +118,10 @@ return require('packer').startup(function() }, } } + local map = vim.api.nvim_set_keymap + map('n', '', 'Telescope git_files', {}) + map('n', 'H', 'Telescope help_tags', {}) + map('n', ';', 'Telescope commands', {}) end } @@ -132,6 +136,33 @@ return require('packer').startup(function() end } + -- remote files and lsp + use { + 'chipsenkbeil/distant.nvim', + config = function() + require('distant').setup { + ['*'] = require('distant.settings').chip_default() + } + end, + run = ':DistantInstall' + } + + -- jupyter kernel in nvim (with images, needs ueberzug) + use { + 'dccsillag/magma-nvim', + -- ft = { 'python' }, -- doesn't work + run = ':UpdateRemotePlugins', + config = function() + local map = vim.api.nvim_set_keymap + map('n', 'm', "nvim_exec('MagmaEvaluateOperator', v:true)", { expr = true}) + map('n', 'mm', ':MagmaEvaluateLine', {}) + map('x', 'm', ':MagmaEvaluateVisual', {}) + map('n', 'mc', ':MagmaReevaluateCell', {}) + map('n', 'md', ':MagmaDelete', {}) + map('n', 'mo', ':MagmaShowOutput', {}) + end + } + use { 'nvim-treesitter/playground', opt = true, cmd = { 'TSPlaygroundToggle' } } use { '~/git/argwrap.nvim', opt = true } end) -- cgit