Comments (10)
Try coc-pyright 1.1.78, black/yapf/autopep8 are supported.
from coc-pyright.
Also looking for this! What's the recommend setup right now if you need to use a formatter (i.e. Black) ?
If you use black, I recommend you install the official Black vim plugin https://github.com/psf/black/blob/master/docs/editor_integration.md#vim
from coc-pyright.
Also looking for this! What's the recommend setup right now if you need to use a formatter (i.e. Black) ?
from coc-pyright.
If I can use Pylint
, it would be great!
from coc-pyright.
It looks like the official black plugin doesn't support NeoVim - installing it and running :Black
results in:
The black.vim plugin requires vim7.0+ with Python 3.6 support.
Their README also says this: https://github.com/psf/black/blob/master/docs/editor_integration.md#vim
from coc-pyright.
Ooh, It looks like Ale can do it: https://www.vimfromscratch.com/articles/vim-for-python/
let g:ale_fixers = {
\ 'python': ['black'],
\}
nmap <F10> :ALEFix<CR>
let g:ale_fix_on_save = 1
^ works for me
from coc-pyright.
It looks like the official black plugin doesn't support NeoVim - installing it and running
:Black
results in:The black.vim plugin requires vim7.0+ with Python 3.6 support.
Their README also says this: https://github.com/psf/black/blob/master/docs/editor_integration.md#vim
Works for me in neovim 0.5.x
from coc-pyright.
I alias
nmap <silent> <localleader>bf <Cmd>call CocActionAsync('format')<CR>
And while the Formatter did report that it execute successfully, it does not actually format the document. Can you take a look, thank you!
from coc-pyright.
@Maswor can't reproduce your issue, tested with your mapping and works as expected.
from coc-pyright.
Hi, @fannheyward @Maswor
I also tried the format feature ported from coc-python or vscode-python.
Relative PATH was also possible when setting python.formatting.blackPath
in "coc-python".
In "coc-pyright", you had to specify it in the absolute PATH.
If you set up "coc-pyright" with a relative PATH, it seems to show only the echo message, not the actual formatting.
Relative PATH (NG)
{
// ...snip
"python.formatting.blackPath": "~/.local/bin/black",
// ...snip
}
DEMO
Absolute PATH (OK)
{
// ...snip
"python.formatting.blackPath": "/Users/yaegassy/.local/bin/black",
// ...snip
}
DEMO
from coc-pyright.
Related Issues (20)
- Extension fails to activate on startup HOT 1
- Erases existing argument when completing function call keyword argument HOT 1
- uncaughtException Error: write EPIPE HOT 11
- coc throws error whenever I try to accept any suggestion from pyright HOT 4
- Error on createExtension coc-pyright from coc-pyright/lib/index.js TypeError: Cannot read properties of undefined HOT 5
- new module isn't recognized until I re-open nvim HOT 1
- pyright is not working on LocalConfig on windows HOT 7
- how to disable typechecking? HOT 2
- support call hierachy HOT 1
- Support multiple virtual environments using workspace folders
- coc-pyright seems unable to recognize modules installed by `pip install --editable` HOT 1
- No semantic token group for top level tokens
- Inlay Hints stopped working HOT 1
- "Import cannot be resolved" with new files HOT 3
- Installing spawn EINVAL HOT 1
- coc-settings.json not being respected HOT 3
- Extension doesn't work HOT 3
- Pyright not enabled on files that are opened with go to definition
- How to add sage to "python.autoComplete.extraPaths" ? HOT 1
- High CPU usage when `pow` function exists in code HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coc-pyright.