Skip to content

Instantly share code, notes, and snippets.

@agnivade
Created June 13, 2021 17:52
Show Gist options
  • Save agnivade/2345da4ea541b8bd687d056c006251fc to your computer and use it in GitHub Desktop.
Save agnivade/2345da4ea541b8bd687d056c006251fc to your computer and use it in GitHub Desktop.
Sublime config
[
{ "keys": ["ctrl+k"], "command": "find_under_expand" },
{ "keys": ["ctrl+d"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["alt+up"], "command": "swap_line_up" },
{ "keys": ["alt+down"], "command": "swap_line_down" },
{ "keys": ["alt+d"], "command": "find_under_expand" },
{ "keys": ["ctrl+f10"], "command": "jump_back" },
{ "keys": ["ctrl+."], "command": "auto_complete" },
// Symbol Hover
{
"command": "lsp_hover",
"keys": [
"ctrl+space"
],
"context": [
{
"key": "lsp.session_with_capability",
"operator": "equal",
"operand": "hoverProvider"
}
]
},
// Find Symbol References
{
"command": "lsp_symbol_references",
"keys": [
"shift+f12"
],
"context": [
{
"key": "lsp.session_with_capability",
"operator": "equal",
"operand": "referencesProvider"
},
]
},
// Go To Definition
{
"command": "lsp_symbol_definition",
"args": {
"side_by_side": false
},
"keys": [
"ctrl+f11"
],
"context": [
{
"key": "lsp.session_with_capability",
"operator": "equal",
"operand": "definitionProvider"
},
{
"key": "auto_complete_visible",
"operator": "equal",
"operand": false
}
]
},
// Go To Type Definition
{
"command": "lsp_symbol_type_definition",
"args": {
"side_by_side": false
},
"keys": [
"ctrl+f12"
],
"context": [
{
"key": "lsp.session_with_capability",
"operator": "equal",
"operand": "typeDefinitionProvider"
},
{
"key": "auto_complete_visible",
"operator": "equal",
"operand": false
}
]
},
// Go To Declaration
{
"command": "lsp_symbol_declaration",
"args": {
"side_by_side": false
},
"keys": [
"ctrl+f11"
],
"context": [
{
"key": "lsp.session_with_capability",
"operator": "equal",
"operand": "declarationProvider"
},
{
"key": "auto_complete_visible",
"operator": "equal",
"operand": false
}
]
},
// Go To Implementation
{
"command": "lsp_symbol_implementation",
"args": {
"side_by_side": false
},
"keys": [
"shift+f11"
],
"context": [
{
"key": "lsp.session_with_capability",
"operator": "equal",
"operand": "implementationProvider"
},
{
"key": "auto_complete_visible",
"operator": "equal",
"operand": false
}
]
},
// Rename Symbol
{
"command": "lsp_symbol_rename",
"keys": [
"ctrl+r"
],
"context": [
{
"key": "lsp.session_with_capability",
"operator": "equal",
"operand": "renameProvider"
}
]
},
// Document Symbols (a replacement for ST's "Goto Symbol")
{
"command": "lsp_document_symbols",
"keys": [
"ctrl+.", "ctrl+d"
],
"context": [
{
"key": "lsp.session_with_capability",
"operator": "equal",
"operand": "documentSymbolProvider"
}
]
},
// Format Document
// {
// "command": "lsp_format_document",
// "keys": [
// "UNBOUND"
// ],
// "context": [
// {
// "key": "lsp.session_with_capability",
// "operator": "equal",
// "operand": "documentFormattingProvider | documentRangeFormattingProvider"
// }
// ]
// },
]
{
"clients":
{
"gopls":
{
"command": ["/home/agniva/go/bin/gopls",
"-v",
"-rpc.trace",
"-logfile=/home/agniva/gopls.log"],
"enabled": true,
"env": {
"PATH": "/home/agniva/go/bin:/usr/local/go/bin"
},
"scopes":["source.go"],
"syntaxes": [
"Packages/Go/Go.sublime-syntax",
"Packages/GoSublime/syntax/GoSublime-Go-Recommended.sublime-syntax",
],
"settings": {
"gopls.usePlaceholders": true,
"gopls.completeUnimported": true,
},
"languageId": "go"
}
},
"document_highlight_style": "underline",
"only_show_lsp_completions": true,
"show_references_in_quick_panel": true,
"show_diagnostics_panel_on_save": 0,
"lsp_format_on_save": true,
"log_debug": true,
"log_stderr": true
}
{
"color_scheme": "Packages/Color Scheme - Default/Mariana.sublime-color-scheme",
"font_size": 10,
"ignored_packages":
[
"GoSublime",
"Vintage",
],
"lsp_code_actions_on_save":
{
"source.fixAll": true,
"source.organizeImports": true,
},
"lsp_format_on_save": true,
"scroll_past_end": false,
"theme": "Material-Theme.sublime-theme",
"trim_trailing_white_space_on_save": true,
"word_wrap": "true",
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment