Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use standard-indent instead of tab-width #335

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

ncaq
Copy link
Contributor

@ncaq ncaq commented Aug 30, 2024

I see the following warnings.

Warning: copilot--infer-indentation-offset found no mode-specific indentation offset, using ’tab-width’ instead.  You can suppress this error message by customizing ’copilot-indent-warning-suppress’.

Reading the documentation comments for tab-width shows that it has no effect if spaces are used for indentation.

Documentation
Distance between tab stops (for display of tab characters), in columns.

This controls the width of a TAB character on display.
The value should be a positive integer.
Note that this variable doesn't necessarily affect the size of the
indentation step.  However, if the major mode's indentation facility
inserts one or more TAB characters, this variable will affect the
indentation step as well, even if indent-tabs-mode is non-nil.

If tabs are used, the tab-width is automatically adjusted, so there seems to be no need to worry about it.

Conversely, tabSize is supposed to be the real tab size, not the indentation size, so put the value as it is.

@jcs090218
Copy link
Member

Make sense! Thanks!

@ncaq
Copy link
Contributor Author

ncaq commented Aug 31, 2024

I looked back and realized that I should change the :tabSize in copilot--generate-doc to tab-width.

I see the following warnings.

```
Warning: copilot--infer-indentation-offset found no mode-specific indentation offset, using ’tab-width’ instead.  You can suppress this error message by customizing ’copilot-indent-warning-suppress’.
```

Reading the documentation comments for `tab-width` shows that it has no effect if spaces are used for indentation.

```
Documentation
Distance between tab stops (for display of tab characters), in columns.

This controls the width of a TAB character on display.
The value should be a positive integer.
Note that this variable doesn't necessarily affect the size of the
indentation step.  However, if the major mode's indentation facility
inserts one or more TAB characters, this variable will affect the
indentation step as well, even if indent-tabs-mode is non-nil.
```

If tabs are used, the `tab-width` is automatically adjusted, so there seems to be no need to worry about it.

Conversely, `tabSize` is supposed to be the real tab size, not the indentation size, so put the value as it is.
@ncaq
Copy link
Contributor Author

ncaq commented Aug 31, 2024

I rewrited.

@jcs090218
Copy link
Member

Thank you!

@jcs090218 jcs090218 merged commit 8ddfbee into copilot-emacs:main Sep 6, 2024
10 checks passed
@ncaq ncaq deleted the remove-tab-width branch September 13, 2024 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants