Sublime Text3自动lint关闭及MAC端函数提示配置求助
I've got you covered on both of your questions—these are totally common tweaks for ST3 users, especially when switching between Windows and Mac.
1. Turning off real-time lint error prompts
Most likely, you're using a linting plugin like SublimeLinter (the most popular one for ST3). Here's how to dial back those annoying real-time alerts:
- Open the Command Palette: press
Cmd+Shift+P(on Mac) - Type
SublimeLinter: Settingsand hit Enter to open the user settings file - Look for the
lint_modekey in your settings. Change its value from"background"(the default real-time mode) to either:"save": Only runs linting when you save your file"load_save": Runs linting when you open or save a file
- If you want to disable linting entirely (not recommended, but an option), add
"enabled": falseto the settings.
Note: If you're using a different lint plugin (like ESLint for JS, or Pylint directly), you'll need to open that plugin's specific settings and look for similar "real-time" or "live linting" toggles.
2. Getting function signatures/tooltips working on Mac
The function hints you're missing are usually handled by a smart completion plugin. Let's go with two reliable options:
Option 1: Use Anaconda (great for Python)
Anaconda is a popular Python-focused plugin that handles completions and signatures seamlessly:
- Open the Command Palette (
Cmd+Shift+P), typePackage Control: Install Package, then search forAnacondaand install it - Go to
Preferences > Package Settings > Anaconda > Settings - User - Add these lines to ensure signatures are enabled:
"enable_signatures_tooltip": true, "auto_show_signatures": true - Critical for Mac: Make sure your Python interpreter path is correctly set. If you're using a system Python or a virtual environment, add this line (adjust the path to your Python):
"python_interpreter": "/usr/local/bin/python3" - Restart Sublime Text after saving the settings.
Option 2: Use LSP (supports multiple languages)
If you work with more than just Python, LSP (Language Server Protocol) is a universal solution:
- Install the
LSPplugin via Package Control - Then install the language-specific LSP server for your needs (e.g.,
LSP-pyrightfor Python,LSP-eslintfor JS) - Go to
Preferences > Package Settings > LSP > Settings - User - Ensure the
showSignatureHelpsetting is enabled, and that your chosen language server is listed underclientswith"enabled": true - Again, double-check that the server has access to your project's dependencies (for Mac, sometimes you need to make sure Sublime has permission to access your home folder or virtual environments)
If it's still not working, try reinstalling the plugin, restarting Sublime, or checking if your project's virtual environment is activated (some plugins need that to pick up third-party packages).
内容的提问来源于stack exchange,提问作者Tracy Gao

