Sublime text 3 lsp setup

March 10, 2021

Steps to setup sublime text 3 with the sublime lsp

{
  "clients": {
    "pyls": {
      "enabled": true,
      "command": [
        "pyls"
      ],
      "languageId": "python",
      "scopes": [
        "source.python"
      ],
      "syntaxes": [
        "Packages/Python/Python.sublime-syntax",
        "Packages/MagicPython/grammars/MagicPython.tmLanguage",
        "Packages/Djaneiro/Syntaxes/Python Django.tmLanguage"
      ],
      "configurationSources": [
        "flake8"
      ],
      "settings": {
        "pyls": {
          "plugins": {
            "pyls_mypy": {
              "enabled": true,
              "live_mode": true
            },
            "pyls_black": {
              "enabled": true
            },
            "pydocstyle": {
              "enabled": true
            },
            "autopep8": {
              "enabled": false
            },
            "epylint": {
              "enabled": false
            },
            "flake8": {
              "enabled": true
            },
            "pycodestyle": {
              "enabled": false
            },
            "pyflakes": {
              "enabled": false
            },
            "pylint": {
              "enabled": false
            },
            "pyreverse": {
              "enabled": false
            },
            "symilar": {
              "enabled": false
            },
            "yapf": {
              "enabled": false
            }
          }
        }
      }
    }
  },
  "only_show_lsp_completions": true,
  "log_stderr": true,
  "log_debug": false,
  "auto_show_diagnostics_panel": "never"
}
[
  { "keys": ["f2"], "command": "lsp_symbol_rename" },
  { "keys": ["f12"], "command": "lsp_symbol_definition" },
  { "keys": ["super+option+r"], "command": "lsp_document_symbols" },
  { "keys": ["super+option+h"], "command": "lsp_hover"},
  { "keys": ["ctrl+space"], "command": "auto_complete" },
  { "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
    [
      { "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
      { "key": "auto_complete_visible", "operator": "equal", "operand": false },
      { "key": "setting.tab_completion", "operator": "equal", "operand": true },
    ]
  },
]