mattn / mattn/vim-lsp-settings

"max-line-length" is not taken into account in g:lsp_settings

Open
#308 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vim Script
Stars
1.4k
Forks
245
Avg merge
3m
Merged PRs (30d)
1

Description

Hi

"max-line-length": 120 is not taken into account in let g:lsp_settings. Other settings as ignore works. I have the following in lsp-settings for python:

    let g:lsp_settings = {
    \   'filetype': {'python': 'pyls-all'},
    \   'pyls': {
    \     'workspace_config': {
    \         'pyls': {
    \             'configurationSources': ['pycodestyle'],
    \             'plugins': {
    \                 'pydocstyle': {'enabled': v:true},
    \                 'pycodestyle': {
    \                     'enabled': v:true,
    \                     "ignore": ["E226", "E302", "E41"],
    \                     "max-line-length": 120,
    \                 },
    \                 'black': {'enable': v:true},
    \                 'autopep8': {'enable': v:true},
    \             },
    \         },
    \     },
    \   },
    \ }

I get warnings in my code as e.g.: `Lsp: E501 line too long (140 > 79 characters)`

My environment:

- OS: Linux Mint 20 Ulyana
- Vim: NVIM v0.4.4
- Python: 3.8.2
- Lsp: pyls-all

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how g:lsp_settings passes the pyls workspace_config to pyls-all, focusing on the pycodestyle ignore and max-line-length options. Reproduce the configuration with a 140-character line and verify that the resulting E501 warning respects the configured limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, vim
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.