Customize Mappings
Mappings can be customized through AstroCore and AstroLSP. AstroCore handles the general mappings that are applied to the editor where AstroLSP handles mappings that are set when a language server attaches. This page goes over how to customize these mappings to fit your needs.
Add Custom Mappings
These tables are a direct conversion to the vim.keymap.set({mode}, {lhs}, {rhs}, {opts})
Lua API. The first key into the table is the {mode}
, the second key into the table is the {lhs}
, and the element there is the {opts}
table with the {rhs}
in the first key. Also AstroLSP supports adding a cond
key which can dictate when the mapping should be attached (this is described in detail in the AstroLSP plugin configuration documentation) Here is a simple plugin specification example of setting both core and LSP mappings:
Enable Telescope LSP Mappings
Telescope provides functionality for using the picker for tasks such as getting references and symbols. This can be easily enabled through AstroLSP. Here is an example specification that can be added to your plugins: