Git Product home page Git Product logo

Comments (8)

Shougo avatar Shougo commented on August 21, 2024 1

I get it. You must use following setting.

let g:neocomplete#sources#omni#input_patterns.go = '[^.[:digit:] *\t]\.\w*'

from neocomplete.vim.

Shougo avatar Shougo commented on August 21, 2024

I think it is omnifunc problem.
You should use g:neocomplete#force_omni_input_patterns instead of g:neocomplete#sources#omni#input_patterns.

if !exists('g:neocomplete#force_omni_input_patterns')
        let g:neocomplete#force_omni_input_patterns = {}
endif
let g:neocomplete#force_omni_input_patterns.go = '[^.[:digit:] *\t]\.'

from neocomplete.vim.

gustavo-hms avatar gustavo-hms commented on August 21, 2024

Ok. Now it seems to work in most cases. There are, however, 2 small problems:

  • if I have a struct with fields that start with uppercase letters and I type its lowercase equivalent (e.g., in the example above, I type x.a), the plugin shows nothing; isn't it supposed to ignore case by default?
  • if I have a method declaration as in
func (a AStruct) someMethod()

and I then type

a.

, it doesn't find any completion; however, if I replace the "a" with something bigger, as in

func (aStruct AStruct) someMethod()

it works. Strange behaviour, since it does work in the previous example, with the variable "x" (which also has only one letter)

Sorry for bottering you with what apparently is a language specific problem. But I'm not sure it is omnifunc's fault, since it works as expected with YouCompleteMe, even if this plugin has no knowledge of the Go language. Maybe I'm missing something in the configuration...

from neocomplete.vim.

Shougo avatar Shougo commented on August 21, 2024

if I have a struct with fields that start with uppercase letters and I type its lowercase equivalent (e.g., in the example above, I type x.a), the plugin shows nothing; isn't it supposed to ignore case by default?

I think it is omnifunc problem... I cannot fix it.

from neocomplete.vim.

Shougo avatar Shougo commented on August 21, 2024

if I have a method declaration as in func (a AStruct) someMethod() and I then type a. , it doesn't find any completion; however, if I replace the "a" with something bigger, as in func (aStruct AStruct) someMethod() it works. Strange behaviour, since it does work in the previous example, with the variable "x" (which also has only one letter)

OK. I will check it. But your information is too few.
You must show me in detail(test file and screenshots and reproduction method).

from neocomplete.vim.

Shougo avatar Shougo commented on August 21, 2024

if I have a method declaration as in func (a AStruct) someMethod() and I then type a. , it doesn't find any completion; however, if I replace the "a" with something bigger, as in func (aStruct AStruct) someMethod() it works. Strange behaviour, since it does work in the previous example, with the variable "x" (which also has only one letter)

I checked it and it works.

from neocomplete.vim.

Shougo avatar Shougo commented on August 21, 2024

In neocomplete, it supports go omni patterns by default.

from neocomplete.vim.

gustavo-hms avatar gustavo-hms commented on August 21, 2024

It works! Thank you!

from neocomplete.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.