mirror of https://github.com/neovim/neovim.git
Compare commits
3 Commits
0354a903c5
...
aacac2c103
Author | SHA1 | Date |
---|---|---|
Gregory Anders | aacac2c103 | |
dundargoc | c18d7941ef | |
Gregory Anders | 7d936c3860 |
|
@ -50,11 +50,6 @@ file(GLOB DOCFILES CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/runtime/doc/*.txt)
|
|||
set_directory_properties(PROPERTIES
|
||||
EP_PREFIX "${DEPS_BUILD_DIR}")
|
||||
|
||||
find_program(CCACHE_PRG ccache)
|
||||
if(CCACHE_PRG)
|
||||
set(CMAKE_C_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env CCACHE_SLOPPINESS=pch_defines,time_macros ${CCACHE_PRG})
|
||||
endif()
|
||||
|
||||
if(NOT CI_BUILD)
|
||||
set(CMAKE_INSTALL_MESSAGE NEVER)
|
||||
endif()
|
||||
|
|
|
@ -23,6 +23,12 @@ if(POLICY CMP0092)
|
|||
list(APPEND DEPS_CMAKE_ARGS -D CMAKE_POLICY_DEFAULT_CMP0092=NEW)
|
||||
endif()
|
||||
|
||||
find_program(CACHE_PRG NAMES ccache sccache)
|
||||
if(CACHE_PRG)
|
||||
set(CMAKE_C_COMPILER_LAUNCHER ${CMAKE_COMMAND} -E env CCACHE_SLOPPINESS=pch_defines,time_macros ${CACHE_PRG})
|
||||
list(APPEND DEPS_CMAKE_CACHE_ARGS -DCMAKE_C_COMPILER_LAUNCHER:STRING=${CMAKE_C_COMPILER_LAUNCHER})
|
||||
endif()
|
||||
|
||||
# MAKE_PRG
|
||||
if(UNIX)
|
||||
find_program(MAKE_PRG NAMES gmake make)
|
||||
|
@ -58,7 +64,8 @@ function(get_externalproject_options name DEPS_IGNORE_SHA)
|
|||
|
||||
set(EXTERNALPROJECT_OPTIONS
|
||||
DOWNLOAD_NO_PROGRESS TRUE
|
||||
EXTERNALPROJECT_OPTIONS URL ${${name_allcaps}_URL})
|
||||
EXTERNALPROJECT_OPTIONS URL ${${name_allcaps}_URL}
|
||||
CMAKE_CACHE_ARGS ${DEPS_CMAKE_CACHE_ARGS})
|
||||
|
||||
if(NOT ${DEPS_IGNORE_SHA})
|
||||
list(APPEND EXTERNALPROJECT_OPTIONS URL_HASH SHA256=${${name_allcaps}_SHA256})
|
||||
|
|
|
@ -281,10 +281,6 @@ gr{char} Replace the virtual characters under the cursor with
|
|||
that have a special meaning in Insert mode, such as
|
||||
most CTRL-keys, cannot be used.
|
||||
|
||||
*gr-default*
|
||||
Mapped to |vim.lsp.buf.references()| by default.
|
||||
|default-mappings|
|
||||
|
||||
*digraph-arg*
|
||||
The argument for Normal mode commands like |r| and |t| is a single character.
|
||||
When 'cpo' doesn't contain the 'D' flag, this character can also be entered
|
||||
|
|
|
@ -61,6 +61,16 @@ options are not restored when the LSP client is stopped or detached.
|
|||
- |K| is mapped to |vim.lsp.buf.hover()| unless |'keywordprg'| is customized or
|
||||
a custom keymap for `K` exists.
|
||||
|
||||
*gll* *glr* *gln* *i_CTRL-S*
|
||||
Some keymaps are created unconditionally when Nvim starts:
|
||||
- "gln" is mapped in Normal mode to |vim.lsp.buf.rename()|
|
||||
- "gll" is mapped in Normal and Visual mode to |vim.lsp.buf.code_action()|
|
||||
- "glr" is mapped in Normal mode to |vim.lsp.buf.references()| |gr-default|
|
||||
- CTRL-S is mapped in Insert mode to |vim.lsp.buf.signature_help()|
|
||||
|
||||
If not wanted, these keymaps can be removed at any time using
|
||||
|vim.keymap.del()| or |:unmap|.
|
||||
|
||||
*lsp-defaults-disable*
|
||||
To override the above defaults, set or unset the options on |LspAttach|: >lua
|
||||
|
||||
|
@ -80,9 +90,6 @@ Example: >lua
|
|||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
callback = function(args)
|
||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
if client.supports_method('textDocument/rename') then
|
||||
-- Create a keymap for vim.lsp.buf.rename()
|
||||
end
|
||||
if client.supports_method('textDocument/implementation') then
|
||||
-- Create a keymap for vim.lsp.buf.implementation
|
||||
end
|
||||
|
|
|
@ -138,6 +138,10 @@ of these in your config by simply removing the mapping, e.g. ":unmap Y".
|
|||
- * |v_star-default|
|
||||
- gc |gc-default| |v_gc-default| |o_gc-default|
|
||||
- gcc |gcc-default|
|
||||
- |gln|
|
||||
- |gll|
|
||||
- |glr|
|
||||
- <C-S> |i_CTRL-S|
|
||||
- ]d |]d-default|
|
||||
- [d |[d-default|
|
||||
- <C-W>d |CTRL-W_d-default|
|
||||
|
|
|
@ -146,6 +146,31 @@ do
|
|||
vim.keymap.set({ 'o' }, 'gc', textobject_rhs, { desc = 'Comment textobject' })
|
||||
end
|
||||
|
||||
--- Default maps for LSP functions.
|
||||
---
|
||||
--- These are mapped unconditionally to avoid different behavior depending on whether an LSP
|
||||
--- client is attached. If no client is attached, or if a server does not support a capability, an
|
||||
--- error message is displayed rather than exhibiting different behavior.
|
||||
---
|
||||
--- See |glr|, |gln|, |gll|, |i_CTRL-S|.
|
||||
do
|
||||
vim.keymap.set('n', 'gln', function()
|
||||
vim.lsp.buf.rename()
|
||||
end, { desc = 'vim.lsp.buf.rename()' })
|
||||
|
||||
vim.keymap.set({ 'n', 'x' }, 'gll', function()
|
||||
vim.lsp.buf.code_action()
|
||||
end, { desc = 'vim.lsp.buf.code_action()' })
|
||||
|
||||
vim.keymap.set('n', 'glr', function()
|
||||
vim.lsp.buf.references()
|
||||
end, { desc = 'vim.lsp.buf.references()' })
|
||||
|
||||
vim.keymap.set('i', '<C-S>', function()
|
||||
vim.lsp.buf.signature_help()
|
||||
end, { desc = 'vim.lsp.buf.signature_help()' })
|
||||
end
|
||||
|
||||
--- Map [d and ]d to move to the previous/next diagnostic. Map <C-W>d to open a floating window
|
||||
--- for the diagnostic under the cursor.
|
||||
---
|
||||
|
|
Loading…
Reference in New Issue