-
-
Notifications
You must be signed in to change notification settings - Fork 602
isort Plugins
Jeroen de Vries edited this page Jun 7, 2024
·
37 revisions
Several plugins have been written that allow you to use isort to add, remove, and sort imports from the comfort of your favorite text editor:
- Kate: https://github.com/timothycrosley/isort#installing-isorts-kate-plugin -written and maintained by @timothycrosley
-
VIM
- https://github.com/fisadev/vim-isort#installation - written and maintained by @fisadev.
-
ALE (isort fixer) -
let g:ale_fixers = {'python': ['isort']}
-
command! -range=% Isort :<line1>,<line2>! isort -
- just add this to your ~/.vimrc - https://github.com/brentyi/isort.vim#installation - written and maintained by @brentyi.
- Just call
:%!isort -
-
Neovim
- https://github.com/stsewd/isort.nvim#install - written and maintained by @stsewd.
- https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main/doc/BUILTINS.md#isort - LSP integration, written by @jose-elias-alvarez
- Emacs: https://github.com/paetzke/py-isort.el - written and maintained by @paetzke.
- Sublime
-
Atom:
- https://github.com/bh/atom-python-isort - written by @bh.
- https://atom.io/packages/atom-isort - fork of the above by @lexicalunit.
- https://atom.io/packages/formatters-python - written and maintained by @utkarshgupta137.
- VSCode: https://github.com/Microsoft/vscode-python - written and maintained by @DonJayamanne; now also by @Microsoft
- pre-commit: officially supported through isort repo - see https://pycqa.github.io/isort/docs/configuration/pre-commit.html#seed-isort-config
-
PyCharm
- Option 1: File Watcher
- Make sure you have the File Watchers plugin installed.
- Go to
Preferences or Settings -> Tools -> File Watchers
and click+
to add a new watcher:- Name:
isort
- File Type:
Python
- Scope:
Project Files
- Program:
$PyInterpreterDirectory$/isort
- Arguments:
$FilePath$
- If you are using code formatter such as Black, use
$FilePath$ --profile black
instead to avoid conflicts.
- If you are using code formatter such as Black, use
- Output paths to refresh:
$FilePath$
- Working directory:
$ProjectFileDir$
- In Advanced Options
- Uncheck "Auto-save edited files to trigger the watcher"
- Uncheck "Trigger the watcher on external changes"
- Name:
- Option 2: External Tool
- Option 1: File Watcher
- Your Plugin: If you create a new plugin, please feel free to add a reference to it here.
name: Build and Deploy to Azure Web App
on: push: branches: - main # or 'master' if you're old-school workflow_dispatch:
jobs: build-and-deploy: runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Build project (optional)
run: npm run build
# Remove or change this if you don’t have a build script
- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v3
with:
app-name: your-app-name
slot-name: Production
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: .package-lock.jsonnpm installNode.jsgit add package-lock.json
git commit -m "Add lockfile for GitHub Actions cache" git push