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

Order is not respected when variable starts with @ (ruby-mode) #22

Closed
otavioschwanck opened this issue Jan 2, 2022 · 3 comments
Closed
Labels
question Further information is requested

Comments

@otavioschwanck
Copy link

Here an example:
image

value on company-fuzzy--backends:

(company-capf company-dabbrev-code company-ruby-backend company-rspec-backend)

@jcs090218
Copy link
Member

jcs090218 commented Jan 2, 2022

Are you using lsp-mode? Try tweak the variable company-fuzzy-passthrough-backends.

@jcs090218
Copy link
Member

jcs090218 commented Jan 2, 2022

Long answer is: at symbol @ isn't be detected as a prefix. See function company-fuzzy--get-prefix.

(defun company-fuzzy--get-prefix ()
"Set the prefix just right before completion."
(setq company-fuzzy--is-trigger-prefix-p nil
company-fuzzy--prefix (or (ignore-errors (company-fuzzy--generic-prefix))
(ffap-file-at-point))))

You can modify the syntax entry by doing the following:

(add-hook 'ruby-mode-hook (lambda () (modify-syntax-entry ?@ "w"))

Hope the above information helps!

@jcs090218 jcs090218 added the question Further information is requested label Jan 2, 2022
@otavioschwanck
Copy link
Author

Hi @jcs090218 , thanks for you answer.

Setting company-fuzzy-passthrough-backends to '(company-capf) doesnt work, same problem.

Adding the hook (add-hook 'ruby-mode-hook (lambda () (modify-syntax-entry ?@ "w"))) did the trick <3

Thanks for your attention, i love the fuzzy on company <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants