Questions tagged [completion]

250 questions
2
votes
1 answer

How to populate emacs completion collection when list items include spaces

New to Emacs: I am trying to populate a completion collection from a sql query: All goes according to plan except the completion list is ends up as individual words rather than the complete list item as a string with spaces. (defun…
2
votes
0 answers

ZSH Autocompletion: Display value A, use value B

When using compdef for ZSH completion, I would like to display a "nice" name to a user (e.g. a device name) and when it is selected, a different value is injected (e.g. device serial number / UUID). How can this be done with _arguments /…
Zach Riggle
  • 2,975
  • 19
  • 26
2
votes
0 answers

Is there a way to get javascript keywords and reserved words from nashron?

I am trying to create a completion provider for javascript. what I need is to get the keyword and reserved words of javascript from the nashorn. Is there a way to do that?
2
votes
1 answer

How to fix: "Member 'value' in X produces result of type X, but context expects X" (X == "Either")

I'm setting up an api client with Openweathermap for a Swift based iOS app. I followed a tutorial for how to set it up, but had to change weather providers because their service no longer provides free api keys. I have a bug with the type of the…
ryankuck
  • 320
  • 3
  • 15
2
votes
0 answers

How do I make zsh compsys fallback to local files for commands?

I think the simplest example is that if a command does not exist, then invalid-command will present a list of files that you can tab complete on. If the command (and completion) does exist, then on exhausting the completions, hitting
HaaR
  • 1,383
  • 2
  • 13
  • 21
2
votes
1 answer

Downloading Text File From AWS S3 in Swift 5

This is likely a very easy answer. I am fairly new to Swift and just getting feet wet with AWS. I simply want to download a JSON file to a string var in Swift so that I can parse, etc. I'm not able to find a good example (other than a repetitive one…
S Graham
  • 232
  • 2
  • 14
2
votes
1 answer

How to completion with function paren or arguments with Vim-lsp

With vim-lsp in java code, after type System.out.printf the following candidates appears: printf(Locale l, String format, Object... args) printf(String format, Object... args) When I choose first of the candidates, System.out.printf but I want to…
2
votes
3 answers

bash completion on empty (blank) command

On MSYS2 on my Windows machine, I have to switch to bash because tcsh is flaky and after an hour of messing around with completion scripts, .bashrc and .inputrc, I have almost got bash to behave in a way I am used to. However, there's one piece…
user0
  • 97
  • 9
2
votes
1 answer

using bash_completion with cli tool

I have a custom cli tool that i want to setup with bash_completion but want [tab][tab] to perform an enter action on cmdline. my bash_completion file for wonder is: _wonder() { local cur=${COMP_WORDS[COMP_CWORD]} COMPREPLY=( $(compgen -W…
2
votes
1 answer

Emacs dabbrev-expand for whole line

Is there some possibility to achieve whole line completion in emacs? I mean something similar to vim's C-x C-l - like dabbrev-expand but completing whole line.
Lemurata
  • 235
  • 2
  • 12
2
votes
1 answer

Empty value generates mapper_parsing_exception for Elasticsearch completion suggester field

I have a name field which is a completion suggester, and indexing generates a mapper_parsing_exception error, stating value must have a length > 0. There are indeed some empty values in this field. How do I accommodate them? ignore_malformed had no…
Mike Muldoon
  • 551
  • 1
  • 4
  • 11
2
votes
0 answers

vim insert-mode autocomplete using viminfo, recently opened files, sorted by word frequency

vim completion looks in dictionary, thesaurus and other buffers, but not the registers and mru files - I can do it by opening .viminfo and other most recently used files in background buffers. Can this be automated in vim. Also the completion (huge…
mosh
  • 1,402
  • 15
  • 16
2
votes
1 answer

What does -= and += mean in the function?

au FileType php call PHPFuncList() function PHPFuncList() set dictionary-=/etc/vim/php_funclist.txt dictionary+=/etc/vim/php_funclist.txt set complete-=k complete+=k endfunction For the PHPFunctionList above, two lines in…
showkey
  • 482
  • 42
  • 140
  • 295
2
votes
3 answers

Using iOS Swift Generics in Completion blocks

I Need to load a raw image from a resource and convert it to a UIImage that will be stored later in an image cache. Every image has an identifier which is used as key in the cache. When I try to solve that problem with generics, I get this strange…
Niklas
  • 21
  • 1
2
votes
1 answer

How to fill column with another on conditions applied on both columns

I am trying to perform a very simple data completion : I have two columns of the same measurement made in two different locations a few miles away from each other. Location 1 is more complete than location 2, and I want to complete the second with…