GithubHelp home page GithubHelp logo

Comments (13)

mattn avatar mattn commented on June 10, 2024

Probably, you are using Vim on WSL that is sharing ~/.vim with Windows? And probably you clone the repository on Windows. Right? Then, you should not set autocrlf=true in your .gitconfig.

from asyncomplete.vim.

fekir avatar fekir commented on June 10, 2024

No, I'm not using WSL.
I've cloned the repo with git-for-windows:

> git config core.autocrlf
false
> git clone https://github.com/prabirshrestha/asyncomplete.vim.git
[...]
> file asyncomplete.vim/plugin/asyncomplete.vim
asyncomplete.vim/plugin/asyncomplete.vim: ASCII text, with CRLF line terminators

I have explicitly set autocrlf = false in my git configuration, but this decision is overridden by .gitattibutes.

Instead of deleting the .gitattibutes, you might want to consider setting * text=auto eol=lf...

from asyncomplete.vim.

mattn avatar mattn commented on June 10, 2024

What do you get with?

$ wget https://raw.githubusercontent.com/prabirshrestha/asyncomplete.vim/master/autoload/asyncomplete.vim
$ file asyncomplete.vim

from asyncomplete.vim.

fekir avatar fekir commented on June 10, 2024
$ wget https://raw.githubusercontent.com/prabirshrestha/asyncomplete.vim/master/autoload/asyncomplete.vim
$ file asyncomplete.vim
asyncomplete.vim: ASCII text

Note that I also have lf line terminators if I clone the repository with WSL.

It is a windows-specific "feature" that text files have crlf line terminator, and git-for-windows is honoring that convention with the given .gitattributes

from asyncomplete.vim.

stale avatar stale commented on June 10, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from asyncomplete.vim.

fekir avatar fekir commented on June 10, 2024

@mattn considering the fact that the issue is trivial to fix could you revert what the bot decided?

Do you need other information?

from asyncomplete.vim.

mattn avatar mattn commented on June 10, 2024

Pleaes try this solution https://stackoverflow.com/questions/2517190/how-do-i-force-git-to-use-lf-instead-of-crlf-under-windows/33424884#33424884

Anyway, this is not an issue of vim-lsp.

from asyncomplete.vim.

mattn avatar mattn commented on June 10, 2024

At least, AFAIK, you must not set * text=auto

from asyncomplete.vim.

k-takata avatar k-takata commented on June 10, 2024

I think there are two issues:

  1. The * text=auto setting.
    This setting is only useful if someone wants to checkout a file in CRLF on Windows and LF on other systems. Nowadays, Windows Notepad supports both CRLF and LF. Only a few filetypes like batch files and VisualStudio project files need to be in CRLF. Of course, no need to checkout vim files in CRLF. So, I don't think that this setting is needed.
  2. The E488: Trailing characters: ^M error.
    This is most likely a setup issue. This can happen when someone try to source a CRLF vim file into Vim on a unix-like system. Here "unix-like" includes Vim in WSL, Cygwin, MSYS2, and Git for Windows.
    If you use Vim on a unix-like system, you should use Git on that system. (Vim in Git for Windows is an exception, though.)

from asyncomplete.vim.

fekir avatar fekir commented on June 10, 2024

@mattn I think we are talking past each other.

I've already configured git not to make any conversion, but the .gitattibutes file that is checked in overwrites any configuration.

* text=auto is not set by me, it is set in this repository, and leads to the described error.

from asyncomplete.vim.

mattn avatar mattn commented on June 10, 2024

@prabirshrestha What reason for adding * text=auto ?

from asyncomplete.vim.

stale avatar stale commented on June 10, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from asyncomplete.vim.

fekir avatar fekir commented on June 10, 2024

Ping

from asyncomplete.vim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.