1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 22:10:06 +08:00

Update Common Lisp support (#3107)

This commit is contained in:
Wang Shidong 2020-12-20 20:13:28 +08:00 committed by GitHub
parent d626ce2df7
commit 6e6a592bd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 209 additions and 237 deletions

View File

@ -6,218 +6,160 @@
" License: GPLv3
"=============================================================================
""
" @section lang#lisp, layer-lang-lisp
" @parentsection layers
" This layer is for Common Lisp development, disabled by default, to enable this
" layer, add following snippet to your SpaceVim configuration file.
" >
" [[layers]]
" name = 'lang#lisp'
" <
"
" @subsection Key bindings
" >
" Mode Key Function
" ---------------------------------------------
" normal SPC l r run current file
" <
"
" This layer also provides REPL support for lisp, the key bindings are:
" >
" Key Function
" ---------------------------------------------
" SPC l s i Start a inferior REPL process
" SPC l s b send whole buffer
" SPC l s l send current line
" SPC l s s send selection text
" <
"
function! SpaceVim#layers#lang#lisp#plugins() abort
let plugins = []
call add(plugins,['l04m33/vlime', {'on_ft' : 'lisp', 'rtp': 'vim'}])
return plugins
let plugins = []
call add(plugins,['wsdjeg/vim-lisp', {'merged' : 0}])
return plugins
endfunction
function! SpaceVim#layers#lang#lisp#config() abort
let g:vlime_default_mappings = {
\ 'lisp': [
\ ['i', '<Space>', '<Space><c-r>=VlimeKey("space")<cr>'],
\ ['i', '<cr>', '<cr><c-r>=VlimeKey("cr")<cr>'],
\ ['i', '<tab>', '<c-r>=VlimeKey("tab")<cr>'],
\
\ ['n', '<LocalLeader>wp', ':call VlimeCloseWindow("preview")<cr>'],
\ ['n', '<LocalLeader>wr', ':call VlimeCloseWindow("arglist")<cr>'],
\ ['n', '<LocalLeader>wn', ':call VlimeCloseWindow("notes")<cr>'],
\ ['n', '<LocalLeader>wR', ':call VlimeCloseWindow("repl")<cr>'],
\ ['n', '<LocalLeader>wA', ':call VlimeCloseWindow("")<cr>'],
\ ['n', '<LocalLeader>wl', ':call VlimeCloseWindow()<cr>'],
\
\ ['n', '<LocalLeader>i', ':call VlimeInteractionMode()<cr>'],
\ ['n', '<LocalLeader>l', ':call VlimeLoadFile(expand("%:p"))<cr>'],
\ ['n', '<LocalLeader>a', ':call VlimeDisassembleForm(vlime#ui#CurExpr())<cr>'],
\ ['n', '<LocalLeader>p', ':call VlimeSetPackage()<cr>'],
\ ['n', '<LocalLeader>b', ':call VlimeSetBreakpoint()<cr>'],
\ ['n', '<LocalLeader>t', ':call VlimeListThreads()<cr>'],
\ ],
\
\ 'sldb': [
\ ['n', '<cr>', ':call vlime#ui#sldb#ChooseCurRestart()<cr>'],
\ ['n', 'd', ':call vlime#ui#sldb#ShowFrameDetails()<cr>'],
\ ['n', 'S', ':<c-u>call vlime#ui#sldb#OpenFrameSource()<cr>'],
\ ['n', 'T', ':call vlime#ui#sldb#OpenFrameSource("tabedit")<cr>'],
\ ['n', 'r', ':call vlime#ui#sldb#RestartCurFrame()<cr>'],
\ ['n', 's', ':call vlime#ui#sldb#StepCurOrLastFrame("step")<cr>'],
\ ['n', 'x', ':call vlime#ui#sldb#StepCurOrLastFrame("next")<cr>'],
\ ['n', 'o', ':call vlime#ui#sldb#StepCurOrLastFrame("out")<cr>'],
\ ['n', 'c', ':call b:vlime_conn.SLDBContinue()<cr>'],
\ ['n', 'a', ':call b:vlime_conn.SLDBAbort()<cr>'],
\ ['n', 'C', ':call vlime#ui#sldb#InspectCurCondition()<cr>'],
\ ['n', 'i', ':call vlime#ui#sldb#InspectInCurFrame()<cr>'],
\ ['n', 'e', ':call vlime#ui#sldb#EvalStringInCurFrame()<cr>'],
\ ['n', 'D', ':call vlime#ui#sldb#DisassembleCurFrame()<cr>'],
\ ['n', 'R', ':call vlime#ui#sldb#ReturnFromCurFrame()<cr>'],
\ ],
\
\ 'repl': [
\ ['n', '<c-c>', ':call b:vlime_conn.Interrupt({"name": "REPL-THREAD", "package": "KEYWORD"})<cr>'],
\ ['n', '<LocalLeader>I', ':call vlime#ui#repl#InspectCurREPLPresentation()<cr>'],
\ ['n', '<LocalLeader>y', ':call vlime#ui#repl#YankCurREPLPresentation()<cr>'],
\ ['n', '<LocalLeader>C', ':call vlime#ui#repl#ClearREPLBuffer()<cr>'],
\ ],
\
\ 'inspector': [
\ ['n', ['<cr>', '<Space>'], ':call vlime#ui#inspector#InspectorSelect()<cr>'],
\ ['n', ['<c-n>', '<tab>'], ':call vlime#ui#inspector#NextField(v:true)<cr>'],
\ ['n', '<c-p>', ':call vlime#ui#inspector#NextField(v:false)<cr>'],
\ ['n', 'p', ':call vlime#ui#inspector#InspectorPop()<cr>'],
\ ['n', 'R', ':call b:vlime_conn.InspectorReinspect({c, r -> c.ui.OnInspect(c, r, v:null, v:null)})<cr>'],
\ ],
\
\ 'xref': [
\ ['n', '<cr>', ':<c-u>call vlime#ui#xref#OpenCurXref()<cr>'],
\ ['n', 't', ':<c-u>call vlime#ui#xref#OpenCurXref(v:true, "tabedit")<cr>'],
\ ['n', 's', ':<c-u>call vlime#ui#xref#OpenCurXref(v:true, "split")<cr>'],
\ ['n', 'S', ':<c-u>call vlime#ui#xref#OpenCurXref(v:true, "vsplit")<cr>'],
\ ],
\
\ 'notes': [
\ ['n', '<cr>', ':<c-u>call vlime#ui#compiler_notes#OpenCurNote()<cr>'],
\ ['n', 't', ':<c-u>call vlime#ui#compiler_notes#OpenCurNote("tabedit")<cr>'],
\ ['n', 's', ':<c-u>call vlime#ui#compiler_notes#OpenCurNote("split")<cr>'],
\ ['n', 'S', ':<c-u>call vlime#ui#compiler_notes#OpenCurNote("vsplit")<cr>'],
\ ],
\
\ 'threads': [
\ ['n', '<c-c>', ':call vlime#ui#threads#InterruptCurThread()<cr>'],
\ ['n', 'K', ':call vlime#ui#threads#KillCurThread()<cr>'],
\ ['n', 'D', ':call vlime#ui#threads#DebugCurThread()<cr>'],
\ ['n', 'r', ':call vlime#ui#threads#Refresh()<cr>'],
\ ],
\
\ 'server': [
\ ['n', '<LocalLeader>c', ':call VlimeConnectToCurServer()<cr>'],
\ ['n', '<LocalLeader>s', ':call VlimeStopCurServer()<cr>'],
\ ],
\
\ 'input': [
\ ['n', '<c-p>', ':call vlime#ui#input#NextHistoryItem("backward")<cr>'],
\ ['n', '<c-n>', ':call vlime#ui#input#NextHistoryItem("forward")<cr>'],
\ ],
\ }
call SpaceVim#mapping#space#regesit_lang_mappings('lisp', function('s:lisp'))
augroup LocalVlimeKeys
autocmd!
autocmd FileType vlime_sldb call s:vlime_sldb()
autocmd FileType vlime_repl call s:vlime_repl()
autocmd FileType vlime_inspector call s:vlime_inspector()
autocmd FileType vlime_xref call s:vlime_xref()
autocmd FileType vlime_notes call s:vlime_notes()
autocmd FileType vlime_threads call s:vlime_threads()
autocmd FileType vlime_server call s:vlime_server()
autocmd FileType vlime_preview call s:vlime_preview()
autocmd FileType vlime_arglist call s:vlime_arglist()
autocmd FileType vlime_input call s:vlime_input()
augroup end
call SpaceVim#mapping#space#regesit_lang_mappings('lisp', function('s:lisp'))
augroup LocalVlimeKeys
autocmd!
autocmd FileType vlime_sldb call s:vlime_sldb()
autocmd FileType vlime_repl call s:vlime_repl()
autocmd FileType vlime_inspector call s:vlime_inspector()
autocmd FileType vlime_xref call s:vlime_xref()
autocmd FileType vlime_notes call s:vlime_notes()
autocmd FileType vlime_threads call s:vlime_threads()
autocmd FileType vlime_server call s:vlime_server()
autocmd FileType vlime_preview call s:vlime_preview()
autocmd FileType vlime_arglist call s:vlime_arglist()
autocmd FileType vlime_input call s:vlime_input()
augroup end
endfunction
fu! s:lisp() abort
let g:_spacevim_mappings_space.l.c = {'name' : '+Connection Management'}
call SpaceVim#mapping#space#langSPC('nmap', ['l','c', 'c'], 'call VlimeConnectREPL()', 'Connect to Vlime server', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','c', 's'], 'call VlimeSelectCurConnection()', 'Switch Vlime connections', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','c', 'd'], 'call VlimeCloseCurConnection()', 'Disconnect', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','c', 'R'], 'call VlimeRenameCurConnection()', 'Rename the current connection', 1)
let g:_spacevim_mappings_space.l.c = {'name' : '+Connection Management'}
call SpaceVim#mapping#space#langSPC('nmap', ['l','c', 'c'], 'call VlimeConnectREPL()', 'Connect to Vlime server', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','c', 's'], 'call VlimeSelectCurConnection()', 'Switch Vlime connections', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','c', 'd'], 'call VlimeCloseCurConnection()', 'Disconnect', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','c', 'R'], 'call VlimeRenameCurConnection()', 'Rename the current connection', 1)
let g:_spacevim_mappings_space.l.r = {'name' : '+Server Management'}
call SpaceVim#mapping#space#langSPC('nmap', ['l','r', 'r'], 'call VlimeNewServer()', 'Run a new Vlime server and connect to it', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','r', 'v'], 'call VlimeShowSelectedServer()', 'View the console output of a server', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','r', 'R'], 'call VlimeRenameSelectedServer()', 'Rename a server', 1)
let g:_spacevim_mappings_space.l.r = {'name' : '+Server Management'}
call SpaceVim#mapping#space#langSPC('nmap', ['l','r', 'r'], 'call VlimeNewServer()', 'Run a new Vlime server and connect to it', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','r', 'v'], 'call VlimeShowSelectedServer()', 'View the console output of a server', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','r', 'R'], 'call VlimeRenameSelectedServer()', 'Rename a server', 1)
let g:_spacevim_mappings_space.l.s = {'name' : '+Sending Stuff To The REPL'}
call SpaceVim#mapping#space#langSPC('nmap', ['l','s','s'], 'call VlimeSendToREPL(vlime#ui#CurExprOrAtom())',
\ 'Send s-expr or atom under the cursor to REPL', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','s','e'], 'call VlimeSendToREPL(vlime#ui#CurExpr())',
\ 'Send s-expr under the cursor to REPL', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','s','t'], 'VlimeSendToREPL(vlime#ui#CurTopExpr())',
\ 'Send to-level s-expr under the cursor to REPL', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','s','a'], 'call VlimeSendToREPL(vlime#ui#CurAtom())',
\ 'Send atom under the cursor to REPL', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','s','i'], 'call VlimeSendToREPL()',
\ 'Open vlime input buffer for REPL', 1)
call SpaceVim#mapping#space#langSPC('vmap', ['l','s','v'], 'call VlimeSendToREPL(vlime#ui#CurSelection())',
\ 'Send the current selection to the REPL', 1)
let g:_spacevim_mappings_space.l.s = {'name' : '+Sending Stuff To The REPL'}
call SpaceVim#mapping#space#langSPC('nmap', ['l','s','s'], 'call VlimeSendToREPL(vlime#ui#CurExprOrAtom())',
\ 'Send s-expr or atom under the cursor to REPL', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','s','e'], 'call VlimeSendToREPL(vlime#ui#CurExpr())',
\ 'Send s-expr under the cursor to REPL', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','s','t'], 'VlimeSendToREPL(vlime#ui#CurTopExpr())',
\ 'Send to-level s-expr under the cursor to REPL', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','s','a'], 'call VlimeSendToREPL(vlime#ui#CurAtom())',
\ 'Send atom under the cursor to REPL', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','s','i'], 'call VlimeSendToREPL()',
\ 'Open vlime input buffer for REPL', 1)
call SpaceVim#mapping#space#langSPC('vmap', ['l','s','v'], 'call VlimeSendToREPL(vlime#ui#CurSelection())',
\ 'Send the current selection to the REPL', 1)
let g:_spacevim_mappings_space.l.m = {'name' : '+Expanding Macros'}
call SpaceVim#mapping#space#langSPC('nmap', ['l','m','l'], 'call VlimeExpandMacro(vlime#ui#CurExpr(), v:false)',
\ 'Expand the macro under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','m','a'], 'call VlimeExpandMacro(vlime#ui#CurExpr(), v:true)',
\ 'Expand the macro under the cursor and all nested macros', 1)
let g:_spacevim_mappings_space.l.m = {'name' : '+Expanding Macros'}
call SpaceVim#mapping#space#langSPC('nmap', ['l','m','l'], 'call VlimeExpandMacro(vlime#ui#CurExpr(), v:false)',
\ 'Expand the macro under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','m','a'], 'call VlimeExpandMacro(vlime#ui#CurExpr(), v:true)',
\ 'Expand the macro under the cursor and all nested macros', 1)
let g:_spacevim_mappings_space.l.o = {'name' : '+Compiling'}
call SpaceVim#mapping#space#langSPC('nmap', ['l','o','e'], 'call VlimeCompile(vlime#ui#CurExpr(v:true))',
\ 'Compile the form under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','o','t'], 'call VlimeCompile(vlime#ui#CurTopExpr(v:true))',
\ 'Compile the top-level form under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','o','f'], "call VlimeCompileFile(expand('%:p'))",
\ 'Compile the current file', 1)
call SpaceVim#mapping#space#langSPC('vmap', ['l','o','v'], 'call VlimeCompile(vlime#ui#CurSelection(v:true))',
\ 'Compile the current selection', 1)
let g:_spacevim_mappings_space.l.o = {'name' : '+Compiling'}
call SpaceVim#mapping#space#langSPC('nmap', ['l','o','e'], 'call VlimeCompile(vlime#ui#CurExpr(v:true))',
\ 'Compile the form under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','o','t'], 'call VlimeCompile(vlime#ui#CurTopExpr(v:true))',
\ 'Compile the top-level form under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','o','f'], "call VlimeCompileFile(expand('%:p'))",
\ 'Compile the current file', 1)
call SpaceVim#mapping#space#langSPC('vmap', ['l','o','v'], 'call VlimeCompile(vlime#ui#CurSelection(v:true))',
\ 'Compile the current selection', 1)
let g:_spacevim_mappings_space.l.x = {'name' : '+Cross references'}
call SpaceVim#mapping#space#langSPC('nmap', ['l','x','c'], "call VlimeXRefSymbol('CALLS', vlime#ui#CurAtom())",
\ 'Show callers of the function under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','x','C'], "call VlimeXRefSymbol('CALLS-WHO', vlime#ui#CurAtom())",
\ 'Show callees of the function under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','x','r'], 'call VlimeXRefSymbol("REFERENCES", vlime#ui#CurAtom())',
\ 'Show references of the variable under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','x','b'], 'call VlimeXRefSymbol("BINDS", vlime#ui#CurAtom())',
\ 'Show bindings of the variable under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','x','s'], 'call VlimeXRefSymbol("SETS", vlime#ui#CurAtom())',
\ 'Show who sets the value of the variable under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','x','e'], 'call VlimeXRefSymbol("MACROEXPANDS", vlime#ui#CurAtom())',
\ 'Show who expands the macro under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','x','m'], 'call VlimeXRefSymbol("SPECIALIZES", vlime#ui#CurAtom())',
\ 'Show specialized methods for the class under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','x','d'], 'call VlimeFindDefinition(vlime#ui#CurAtom())',
\ 'Show the definition for the name under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','x','i'], 'call VlimeXRefSymbolWrapper()',
\ 'Interactively prompt for the symbol to search', 1)
let g:_spacevim_mappings_space.l.x = {'name' : '+Cross references'}
call SpaceVim#mapping#space#langSPC('nmap', ['l','x','c'], "call VlimeXRefSymbol('CALLS', vlime#ui#CurAtom())",
\ 'Show callers of the function under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','x','C'], "call VlimeXRefSymbol('CALLS-WHO', vlime#ui#CurAtom())",
\ 'Show callees of the function under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','x','r'], 'call VlimeXRefSymbol("REFERENCES", vlime#ui#CurAtom())',
\ 'Show references of the variable under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','x','b'], 'call VlimeXRefSymbol("BINDS", vlime#ui#CurAtom())',
\ 'Show bindings of the variable under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','x','s'], 'call VlimeXRefSymbol("SETS", vlime#ui#CurAtom())',
\ 'Show who sets the value of the variable under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','x','e'], 'call VlimeXRefSymbol("MACROEXPANDS", vlime#ui#CurAtom())',
\ 'Show who expands the macro under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','x','m'], 'call VlimeXRefSymbol("SPECIALIZES", vlime#ui#CurAtom())',
\ 'Show specialized methods for the class under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','x','d'], 'call VlimeFindDefinition(vlime#ui#CurAtom())',
\ 'Show the definition for the name under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','x','i'], 'call VlimeXRefSymbolWrapper()',
\ 'Interactively prompt for the symbol to search', 1)
let g:_spacevim_mappings_space.l.d = {'name' : '+Describing things'}
call SpaceVim#mapping#space#langSPC('nmap', ['l','d','o'], 'call VlimeDescribeSymbol(vlime#ui#CurOperator())',
\ 'Describe the "operator"', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','d','a'], 'call VlimeDescribeSymbol(vlime#ui#CurAtom())',
\ 'Describe the atom under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','d','i'], 'call VlimeDescribeSymbol()',
\ 'Prompt for the symbol to describe', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','d','s'], 'call VlimeAproposList()',
\ 'apropos search', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','d','r'], 'call VlimeShowOperatorArgList(vlime#ui#CurOperator())',
\ 'Show the arglist for the s-expression under the cursor', 1)
let g:_spacevim_mappings_space.l.d = {'name' : '+Describing things'}
call SpaceVim#mapping#space#langSPC('nmap', ['l','d','o'], 'call VlimeDescribeSymbol(vlime#ui#CurOperator())',
\ 'Describe the "operator"', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','d','a'], 'call VlimeDescribeSymbol(vlime#ui#CurAtom())',
\ 'Describe the atom under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','d','i'], 'call VlimeDescribeSymbol()',
\ 'Prompt for the symbol to describe', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','d','s'], 'call VlimeAproposList()',
\ 'apropos search', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','d','r'], 'call VlimeShowOperatorArgList(vlime#ui#CurOperator())',
\ 'Show the arglist for the s-expression under the cursor', 1)
let g:_spacevim_mappings_space.l.d.d = {'name' : '+Documentation'}
call SpaceVim#mapping#space#langSPC('nmap', ['l','d','d', 'o'], 'call VlimeDocumentationSymbol(vlime#ui#CurOperator())',
\ 'Show the documentation for the "operator"', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','d','d', 'a'], 'call VlimeDocumentationSymbol(vlime#ui#CurAtom())',
\ 'Show the documentation for atom', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','d','d', 'i'], 'call VlimeDocumentationSymbol()',
\ 'Show the documentation for the symbol entered in an input buffer', 1)
let g:_spacevim_mappings_space.l.d.d = {'name' : '+Documentation'}
call SpaceVim#mapping#space#langSPC('nmap', ['l','d','d', 'o'], 'call VlimeDocumentationSymbol(vlime#ui#CurOperator())',
\ 'Show the documentation for the "operator"', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','d','d', 'a'], 'call VlimeDocumentationSymbol(vlime#ui#CurAtom())',
\ 'Show the documentation for atom', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','d','d', 'i'], 'call VlimeDocumentationSymbol()',
\ 'Show the documentation for the symbol entered in an input buffer', 1)
let g:_spacevim_mappings_space.l.u = {'name' : '+Undefining'}
call SpaceVim#mapping#space#langSPC('nmap', ['l','u','f'], 'call VlimeUndefineFunction(vlime#ui#CurAtom())',
\ 'Undefine the function under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','u','s'], 'call VlimeUninternSymbol(vlime#ui#CurAtom())',
\ 'Unintern the symbol under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','u','i'], 'call VlimeUndefineUninternWrapper()',
\ 'Interactively prompt for the function/symbol to undefine/unintern', 1)
let g:_spacevim_mappings_space.l.u = {'name' : '+Undefining'}
call SpaceVim#mapping#space#langSPC('nmap', ['l','u','f'], 'call VlimeUndefineFunction(vlime#ui#CurAtom())',
\ 'Undefine the function under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','u','s'], 'call VlimeUninternSymbol(vlime#ui#CurAtom())',
\ 'Unintern the symbol under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','u','i'], 'call VlimeUndefineUninternWrapper()',
\ 'Interactively prompt for the function/symbol to undefine/unintern', 1)
let g:_spacevim_mappings_space.l.I = {'name' : '+Inspection'}
call SpaceVim#mapping#space#langSPC('nmap', ['l','I','i'], 'call VlimeInspect(vlime#ui#CurExprOrAtom())',
\ 'evaluate the s-expr or atom under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','I','e'], 'call VlimeInspect(vlime#ui#CurExpr())',
\ 'evaluate and inspect the s-expr under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','I','t'], 'call VlimeInspect(vlime#ui#CurTopExpr())',
\ 'evaluate and inspect the top-level s-expr under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','I','a'], 'call VlimeInspect(vlime#ui#CurAtom())',
\ 'Evaluate and inspect the atom under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','I','n'], 'call VlimeInspect()',
\ 'Prompt for the expression to inspect', 1)
let g:_spacevim_mappings_space.l.I = {'name' : '+Inspection'}
call SpaceVim#mapping#space#langSPC('nmap', ['l','I','i'], 'call VlimeInspect(vlime#ui#CurExprOrAtom())',
\ 'evaluate the s-expr or atom under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','I','e'], 'call VlimeInspect(vlime#ui#CurExpr())',
\ 'evaluate and inspect the s-expr under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','I','t'], 'call VlimeInspect(vlime#ui#CurTopExpr())',
\ 'evaluate and inspect the top-level s-expr under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','I','a'], 'call VlimeInspect(vlime#ui#CurAtom())',
\ 'Evaluate and inspect the atom under the cursor', 1)
call SpaceVim#mapping#space#langSPC('nmap', ['l','I','n'], 'call VlimeInspect()',
\ 'Prompt for the expression to inspect', 1)
endf
fu! s:vlime_sldb() abort

View File

@ -131,46 +131,47 @@ CONTENTS *SpaceVim-contents*
46. lang#json.................................|SpaceVim-layer-lang-json|
47. lang#julia...............................|SpaceVim-layer-lang-julia|
48. lang#kotlin.............................|SpaceVim-layer-lang-kotlin|
49. lang#livescript.....................|SpaceVim-layer-lang-livescript|
50. lang#lua...................................|SpaceVim-layer-lang-lua|
51. lang#moonscript.....................|SpaceVim-layer-lang-moonscript|
52. lang#nim...................................|SpaceVim-layer-lang-nim|
53. lang#nix...................................|SpaceVim-layer-lang-nix|
54. lang#ocaml...............................|SpaceVim-layer-lang-ocaml|
55. lang#pact.................................|SpaceVim-layer-lang-pact|
56. lang#php...................................|SpaceVim-layer-lang-php|
57. lang#pony.................................|SpaceVim-layer-lang-pony|
58. lang#processing.....................|SpaceVim-layer-lang-processing|
59. lang#prolog.............................|SpaceVim-layer-lang-prolog|
60. lang#puppet.............................|SpaceVim-layer-lang-puppet|
61. lang#python.............................|SpaceVim-layer-lang-python|
62. lang#racket.............................|SpaceVim-layer-lang-racket|
63. lang#racket................................|SpaceVim-layer-lang-red|
64. lang#ring....................................|SpaceVim-layer-lang-r|
65. lang#ring.................................|SpaceVim-layer-lang-ring|
66. lang#ruby.................................|SpaceVim-layer-lang-ruby|
67. lang#rust.................................|SpaceVim-layer-lang-rust|
68. lang#scala...............................|SpaceVim-layer-lang-scala|
69. lang#scheme.............................|SpaceVim-layer-lang-scheme|
70. lang#sh.....................................|SpaceVim-layer-lang-sh|
71. lang#sml...................................|SpaceVim-layer-lang-sml|
72. lang#swig................................|SpaceVim-layer-lang-swift|
73. lang#swig.................................|SpaceVim-layer-lang-swig|
74. lang#tcl...................................|SpaceVim-layer-lang-tcl|
75. lang#toml.................................|SpaceVim-layer-lang-toml|
76. lang#typescript.....................|SpaceVim-layer-lang-typescript|
77. lang#v.......................................|SpaceVim-layer-lang-v|
78. lang#vbnet...............................|SpaceVim-layer-lang-vbnet|
79. lang#xml...................................|SpaceVim-layer-lang-xml|
80. lang#xquery.............................|SpaceVim-layer-lang-xquery|
81. language server protocol........................|SpaceVim-layer-lsp|
82. leaderf.....................................|SpaceVim-layer-leaderf|
83. operator...................................|SpaceVim-layer-operator|
84. shell.........................................|SpaceVim-layer-shell|
85. test...........................................|SpaceVim-layer-test|
86. tmux...........................................|SpaceVim-layer-tmux|
87. tools#dash...............................|SpaceVim-layer-tools-dash|
88. tools#zeal...............................|SpaceVim-layer-tools-zeal|
49. lang#lisp.................................|SpaceVim-layer-lang-lisp|
50. lang#livescript.....................|SpaceVim-layer-lang-livescript|
51. lang#lua...................................|SpaceVim-layer-lang-lua|
52. lang#moonscript.....................|SpaceVim-layer-lang-moonscript|
53. lang#nim...................................|SpaceVim-layer-lang-nim|
54. lang#nix...................................|SpaceVim-layer-lang-nix|
55. lang#ocaml...............................|SpaceVim-layer-lang-ocaml|
56. lang#pact.................................|SpaceVim-layer-lang-pact|
57. lang#php...................................|SpaceVim-layer-lang-php|
58. lang#pony.................................|SpaceVim-layer-lang-pony|
59. lang#processing.....................|SpaceVim-layer-lang-processing|
60. lang#prolog.............................|SpaceVim-layer-lang-prolog|
61. lang#puppet.............................|SpaceVim-layer-lang-puppet|
62. lang#python.............................|SpaceVim-layer-lang-python|
63. lang#racket.............................|SpaceVim-layer-lang-racket|
64. lang#racket................................|SpaceVim-layer-lang-red|
65. lang#ring....................................|SpaceVim-layer-lang-r|
66. lang#ring.................................|SpaceVim-layer-lang-ring|
67. lang#ruby.................................|SpaceVim-layer-lang-ruby|
68. lang#rust.................................|SpaceVim-layer-lang-rust|
69. lang#scala...............................|SpaceVim-layer-lang-scala|
70. lang#scheme.............................|SpaceVim-layer-lang-scheme|
71. lang#sh.....................................|SpaceVim-layer-lang-sh|
72. lang#sml...................................|SpaceVim-layer-lang-sml|
73. lang#swig................................|SpaceVim-layer-lang-swift|
74. lang#swig.................................|SpaceVim-layer-lang-swig|
75. lang#tcl...................................|SpaceVim-layer-lang-tcl|
76. lang#toml.................................|SpaceVim-layer-lang-toml|
77. lang#typescript.....................|SpaceVim-layer-lang-typescript|
78. lang#v.......................................|SpaceVim-layer-lang-v|
79. lang#vbnet...............................|SpaceVim-layer-lang-vbnet|
80. lang#xml...................................|SpaceVim-layer-lang-xml|
81. lang#xquery.............................|SpaceVim-layer-lang-xquery|
82. language server protocol........................|SpaceVim-layer-lsp|
83. leaderf.....................................|SpaceVim-layer-leaderf|
84. operator...................................|SpaceVim-layer-operator|
85. shell.........................................|SpaceVim-layer-shell|
86. test...........................................|SpaceVim-layer-test|
87. tmux...........................................|SpaceVim-layer-tmux|
88. tools#dash...............................|SpaceVim-layer-tools-dash|
89. tools#zeal...............................|SpaceVim-layer-tools-zeal|
7. Usage....................................................|SpaceVim-usage|
1. custom_plugins........................|SpaceVim-usage-custom_plugins|
2. repl............................................|SpaceVim-usage-repl|
@ -2601,6 +2602,35 @@ This layer also provides REPL support for kotlin, the key bindings are:
<
==============================================================================
LANG#LISP *SpaceVim-layer-lang-lisp*
This layer is for Common Lisp development, disabled by default, to enable this
layer, add following snippet to your SpaceVim configuration file.
>
[[layers]]
name = 'lang#lisp'
<
KEY BINDINGS
>
Mode Key Function
---------------------------------------------
normal SPC l r run current file
<
This layer also provides REPL support for lisp, the key bindings are:
>
Key Function
---------------------------------------------
SPC l s i Start a inferior REPL process
SPC l s b send whole buffer
SPC l s l send current line
SPC l s s send selection text
<
==============================================================================
LANG#LIVESCRIPT *SpaceVim-layer-lang-livescript*

View File

@ -1,6 +1,6 @@
---
title: "SpaceVim lang#lisp 模块"
description: "这一模块为 Lisp 开发提供支持,包括代码补全、语法检查、代码格式化等特性。"
description: "这一模块为 Common Lisp 开发提供支持,包括代码补全、语法检查、代码格式化等特性。"
---
# [可用模块](../../) >> lang#lisp
@ -16,7 +16,7 @@ description: "这一模块为 Lisp 开发提供支持,包括代码补全、语
## 模块简介
这一模块为 SpaceVim 提供了 Lisp 开发支持,包括代码补全、语法检查以及代码格式化等特性。
这一模块为 SpaceVim 提供了 Common Lisp 开发支持,包括代码补全、语法检查以及代码格式化等特性。
## 启用模块

View File

@ -1,6 +1,6 @@
---
title: "SpaceVim lang#lisp layer"
description: "This layer is for Lisp development, provide autocompletion, syntax checking, code format for Lisp file."
description: "This layer is for Common Lisp development, provide autocompletion, syntax checking, code format for Common Lisp file."
---
# [Available Layers](../../) >> lang#lisp
@ -16,7 +16,7 @@ description: "This layer is for Lisp development, provide autocompletion, syntax
## Description
This layer is for Lisp development.
This layer is for Common Lisp development.
## Install