Skip to content

Instantly share code, notes, and snippets.

@mutewinter
Last active January 15, 2017 14:39
Show Gist options
  • Save mutewinter/7186595 to your computer and use it in GitHub Desktop.
Save mutewinter/7186595 to your computer and use it in GitHub Desktop.
Add dash and underscore completion for the YouCompleteMe Vim plugin.
diff --git a/ycmd/identifier_utils.py b/ycmd/identifier_utils.py
index 4217fdef..ac91c97b 100644
--- a/ycmd/identifier_utils.py
+++ b/ycmd/identifier_utils.py
@@ -102,6 +102,7 @@ FILETYPE_TO_IDENTIFIER_REGEX = {
}
FILETYPE_TO_IDENTIFIER_REGEX[ 'scss' ] = FILETYPE_TO_IDENTIFIER_REGEX[ 'css' ]
+FILETYPE_TO_IDENTIFIER_REGEX[ 'javascript' ] = FILETYPE_TO_IDENTIFIER_REGEX[ 'css' ]
FILETYPE_TO_IDENTIFIER_REGEX[ 'sass' ] = FILETYPE_TO_IDENTIFIER_REGEX[ 'css' ]
FILETYPE_TO_IDENTIFIER_REGEX[ 'less' ] = FILETYPE_TO_IDENTIFIER_REGEX[ 'css' ]
FILETYPE_TO_IDENTIFIER_REGEX[ 'elisp' ] = (
@mutewinter
Copy link
Author

Updated for ycmd.

@djtango
Copy link

djtango commented May 12, 2016

Does this still work? I can't find any reference to:

def IsIdentifierChar( char ): return char.isalnum() or char == '_'

to change in my local source code .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment