0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

coc.nvim に pycodestyle をあてる

Last updated at Posted at 2020-01-07

pycodestyle と coc-nvim は既にインストールされているものとします。

インストール

:CocInstall coc-python

◯ 補足

extention の一覧を表示する。

:CocList extensions

extention をアンインストールする。

:CocUninstall coc-python

設定

coc-python をインストールするだけではダメで、設定が必要になります。そのままだと pep8 がインストールされてないよ、と言われ、古い方の pep8 をインストールしようとしてきます。それは困るので少し設定をします。

Screen Shot 2020-01-07 at 19.35.56.png

Step 1.

:CocConfig

Step 2.

"python.linting.pep8Path" に "pycodestyle" へのパスを記述します。

{
  "python.linting.pep8Path": "/Users/user/project/venv/bin/pycodestyle"
}

◯ 補足

:set filetype? で確認したものを追記しています。

設定ファイルを置く場所

場所は大きく "the user level" と "the project level" の2種類に分けられます。詳細は以下を参照してください。

"the project level" の場合、設定ファイルを置く場所は workspaceFolders に置く必要があります。workspaceFolders は以下のコマンドで確認が可能です。

:CocList folders

例えば上記のコマンドの実行結果が /Users/user/project/ であった場合 setup.cfg を置く場所は以下のようになります。

/Users/user/project/setup.cfg
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?