Ctrl + s wraps code

When I press ctrl + s to format my code, the code will automatically wrap around when it reaches a certain length. Is there any way to avoid this and make the code stay in one long line?

image

add a .clang-format file with:

ColumnLimit: 0
5 Likes

I tried this in a Python Repl and it didn’t work. Is it different in Python Repls?

(Sorry for necro)

1 Like

It depends on the LSP server’s configuration. It should be possible to remove the Ctrl+S keybinding in the editor settings.

1 Like

I never asked to disable the key bind, lol. I just asked to stop the wrapping.

1 Like

Python is extremely whitespace-sensitive, so what happens in C (that screenshot is of valid C, formatted like ccls would do it) won’t happen in python…

1 Like

Umm… :laughing:

image

try this in pyproject.toml

[tool.yapf]
column_limit=# the number of characters on a line before you want it to split
2 Likes

Thanks, that worked!