Crate asm_lsp

Source

Re-exports§

pub use parser::populate_gas_directives;
pub use parser::populate_instructions;
pub use parser::populate_name_to_directive_map;
pub use parser::populate_name_to_instruction_map;
pub use parser::populate_name_to_register_map;
pub use parser::populate_registers;
pub use types::*;

Modules§

config_builder
handle
parser
types

Enums§

UriConversion

Functions§

alt_mac_config_dir
apply_compile_cmd
Attempts to run the given compile command and parses the resulting output. Any relevant output will be translated into a Diagnostic object and pushed into diagnostics
find_word_at_pos
Find the ([start], [end]) indices and the cursor’s offset in a word on the given line
get_comp_resp
get_compile_cmd_for_req
Returns the compile command associated with uri if it exists, or the default one from compile_cmds otherwise
get_compile_cmds_from_file
Attempts to find either the compile_commands.json or compile_flags.txt file in the project’s root or build directories, returning either file as a CompilationDatabase object
get_completes
Given a NameTo_SomeItem_ map, returns a Vec<CompletionItem> for the items contained within the map
get_default_compile_cmd
Returns a default CompileCommand for the provided uri.
get_document_symbols
Get a tree of symbols describing the document’s structure.
get_global_cfg_dirs
get_goto_def_resp
get_hover_resp
get_include_dirs
Fetches default include directories, as well as any additional directories as specified by a compile_commands.json or compile_flags.txt file in the appropriate location
get_ref_resp
get_root_config
Searches for global config in ~/.config/asm-lsp, then the project’s directory Project specific configs will override global configs
get_sig_help_resp
Produces a signature help response if the appropriate instruction forms can be found
get_word_from_file_params
Returns the word undernearth the cursor given the specified TextDocumentPositionParams
get_word_from_pos_params
Returns a string slice to the word in doc specified by the position params, and the cursor’s offset into the word
instr_filter_targets
process_uri
Sanitizes the URI path sent by an LSP client
run_info
Prints information about the server
send_empty_resp
Sends an empty, non-error response to the lsp client via connection
send_notification
Sends a notification with to the client Param message is the owned type String to help reduce redundant allocations
text_doc_change_to_ts_edit
Convert an lsp_types::TextDocumentContentChangeEvent to a tree_sitter::InputEdit
tree_sitter_logger
Function allowing us to connect tree sitter’s logging with the log crate