wip
This commit is contained in:
parent
ea0b10f35a
commit
1ec250ecda
|
@ -4,7 +4,7 @@ vim.cmd([[ let R_assign=2 ]]) -- underline becomes left ar
|
|||
vim.cmd([[ let R_enable_comment=1 ]]) -- toggle comments with xx
|
||||
|
||||
-- seems to work
|
||||
vim.cmd([[ let R_filetypes = ['r', 'rmd', 'rrst', 'rnoweb', 'quarto', 'rhelp'] ]])
|
||||
-- vim.cmd([[ let R_filetypes = ['r', 'rmd', 'rrst', 'rnoweb', 'quarto', 'rhelp'] ]])
|
||||
vim.cmd([[let g:LanguageClient_serverCommands = {
|
||||
\ 'r': ['R', '--slave', '-e', 'languageserver::run()'],
|
||||
\ }
|
||||
|
@ -14,7 +14,19 @@ vim.cmd([[
|
|||
" autocmd FileType r x :RStop<CR>
|
||||
]])
|
||||
|
||||
vim.cmd([[ autocmd FileType r nnoremap <leader>wwww <Nop> ]])
|
||||
vim.cmd([[
|
||||
" autocmd BufRead, BufNewFile *.r *.qmd *.rmd setlocal filetype = r
|
||||
]])
|
||||
vim.cmd([[
|
||||
function! s:customNvimRMappings()
|
||||
nmap <buffer> <Leader>sr <Plug>RStart
|
||||
" imap <buffer> <Leader>sr <Plug>RStart
|
||||
" vmap <buffer> <Leader>sr <Plug>RStart
|
||||
" nnoremap <Leader>xxx ":call SendRmdChunkToR('echo', 'down')"
|
||||
nmap <buffer> <Leader>wwww ":echo 'hi'<CR>"
|
||||
endfunction
|
||||
augroup myNvimR
|
||||
au!
|
||||
autocmd filetype r call s:customNvimRMappings()
|
||||
augroup end
|
||||
]])
|
||||
|
|
|
@ -35,15 +35,15 @@ vim.opt.rtp:prepend(lazypath)
|
|||
--
|
||||
-- You can also configure plugins after the setup call,
|
||||
-- as they will be available in your neovim runtime.
|
||||
--
|
||||
|
||||
require('lazy').setup({
|
||||
-- NOTE: First, some plugins that don't require any configuration
|
||||
|
||||
-- Nvim-R
|
||||
'jalvesaq/Nvim-R',
|
||||
-- Git related plugins
|
||||
'tpope/vim-fugitive',
|
||||
'tpope/vim-rhubarb',
|
||||
-- 'tpope/vim-fugitive',
|
||||
-- 'tpope/vim-rhubarb',
|
||||
|
||||
-- Detect tabstop and shiftwidth automatically
|
||||
'tpope/vim-sleuth',
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
-- keymaps vs which-key
|
||||
-- which-key should pick up any separaely defined keymaps
|
||||
-- to maintain groups, however, do this in which-key
|
||||
--
|
||||
-- TODO:
|
||||
-- R and Which-key: can not add MY keymaps; don't work in R AND appear in non-R
|
||||
----------------------
|
||||
-- [[ Basic Keymaps ]]
|
||||
----------------------
|
||||
|
@ -16,6 +19,8 @@ vim.keymap.set({ 'i', 'v' }, ':w<CR>', '<esc>:w<CR>',
|
|||
--------------------------
|
||||
-- EXPERIMENTAL
|
||||
--------------------------
|
||||
-- change to directory of current file automatically
|
||||
--vim.cmd([[autocmd BufEnter * lcd %:p:h]])
|
||||
|
||||
|
||||
|
||||
|
@ -131,6 +136,10 @@ local mappings = {
|
|||
z1 = { '<C-W>p', 'other window' },
|
||||
z2 = { '<C-W>pAjunk<esc>', 'other window junk' },
|
||||
rk = { ':RKill<CR>', 'RKill , but not guaranteed to close terminal' },
|
||||
|
||||
-- can not find function
|
||||
-- rcd = { ':call SendRmdChunktoR("echo", "down")<CR>', 'Chunk Down' },
|
||||
|
||||
ck = { ':e ~/.config/kickstart/init.lua<cr>', '[ck] Edit KICKSTART config' },
|
||||
cr = { ':e ~/.config/kickstart/lua/jim/Nvim-R.lua<cr>', '[cr] Edit Nvim-R config' },
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue