diff options
Diffstat (limited to 'config')
| -rw-r--r-- | config/nvim/lua/mappings.lua | 5 | ||||
| -rw-r--r-- | config/nvim/lua/plugins.lua | 47 |
2 files changed, 39 insertions, 13 deletions
diff --git a/config/nvim/lua/mappings.lua b/config/nvim/lua/mappings.lua index a99a478..1e051d7 100644 --- a/config/nvim/lua/mappings.lua +++ b/config/nvim/lua/mappings.lua @@ -47,7 +47,6 @@ vim.cmd [[ autocmd FileType python nmap <leader>bd :g/^\s*breakpoint()$/d<cr> ]] vim.cmd [[ autocmd FileType python nmap <leader>ba mqobreakpoint()<esc>`q ]] -- pluggins - map('x', 'ga', '<cmd>EasyAlign<cr>', {}) map('n', 'ga', '<cmd>EasyAlign<cr>', {}) @@ -55,7 +54,3 @@ map('n', '<leader>l', '<cmd>SidewaysRight<cr>', {}) map('n', '<leader>h', '<cmd>SidewaysLeft<cr>', {}) map('n', '<leader>w', '<cmd>ArgWrap<cr>', {}) - -map('n', '<C-p>', '<cmd>Telescope git_files<cr>', {}) -map('n', '<leader>H', '<cmd>Telescope help_tags<cr>', {}) -map('n', '<leader>;', '<cmd>Telescope commands<cr>', {}) 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', '<C-p>', '<cmd>Telescope git_files<cr>', {}) + map('n', '<leader>H', '<cmd>Telescope help_tags<cr>', {}) + map('n', '<leader>;', '<cmd>Telescope commands<cr>', {}) 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', '<leader>m', "nvim_exec('MagmaEvaluateOperator', v:true)", { expr = true}) + map('n', '<leader>mm', ':MagmaEvaluateLine<CR>', {}) + map('x', '<leader>m', ':<C-u>MagmaEvaluateVisual<CR>', {}) + map('n', '<leader>mc', ':MagmaReevaluateCell<CR>', {}) + map('n', '<leader>md', ':MagmaDelete<CR>', {}) + map('n', '<leader>mo', ':MagmaShowOutput<CR>', {}) + end + } + use { 'nvim-treesitter/playground', opt = true, cmd = { 'TSPlaygroundToggle' } } use { '~/git/argwrap.nvim', opt = true } end) |
