Coder Social home page Coder Social logo

asyncomplete-file.vim's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

asyncomplete-file.vim's Issues

sorting file list by modification date

Hi

thanks for the great plugins!
Question: is it possible to sort the files in the selection window (wildmenu) by modification date (most recent first)?

thanks
David

File Completion Seems Broken

This video shows the broken state. It seems to only work sometimes - almost randomly, and sometimes not at all.

example video

I am currently running MacVim 8.1, patches 1-1270

My current asynccomplete settings are:

Plug 'prabirshrestha/async.vim'
Plug 'prabirshrestha/vim-lsp'
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/asyncomplete-lsp.vim'
Plug 'prabirshrestha/asyncomplete-buffer.vim'
Plug 'prabirshrestha/asyncomplete-file.vim'

let g:lsp_highlight_references_enabled = 0
let g:lsp_highlights_enabled = 0
let g:lsp_textprop_enabled = 0
let g:lsp_diagnostics_echo_cursor = 0
let g:lsp_signs_enabled = 0
let g:lsp_virtual_text_enabled = 0

function! s:get_flowbin(server_info)
    let l:nodemodules_dir = lsp#utils#find_nearest_parent_directory(lsp#utils#get_buffer_path(), 'node_modules')
    if !empty(nodemodules_dir)
        " you might also want to verify if flow binary actually exists
        return [&shell, &shellcmdflag, l:nodemodules_dir . '/.bin/flow lsp']
    endif
    " instead of returning empty you could also return ['flow', 'lsp] to tell it to use global flow.
    return []
endfunction

au User lsp_setup call lsp#register_server({
    \ 'name': 'flow',
    \ 'cmd': function('s:get_flowbin'),
    \ 'root_uri':{server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), '.flowconfig'))},
    \ 'whitelist': ['javascript', 'javascript.jsx'],
    \ })

au User asyncomplete_setup call asyncomplete#register_source(asyncomplete#sources#file#get_source_options({
    \ 'name': 'file',
    \ 'whitelist': ['*'],
    \ 'priority': 10,
    \ 'completor': function('asyncomplete#sources#file#completor')
    \ }))

Vim freezes when editing around URL-like text

When I edited a markdown file, I experienced vim freezing several times. It seems that fnamemodify() is the reason.

let l:cwd = fnamemodify(l:cwd, ':p:h')

If l:cwd is a text like '//a/b/c', vim freezes several seconds. Probably, fnamemodify() might try to search for a network drive in windows os (?) If l:cwd starts with \\ current one is expected behavior, but it would be nice to avoid it if l:cwd starts with //.

I'm using gvim 8.1.1005 on windows 10.

Incomplete in markdown

I am using the asyncomplete-file.vim and asyncomplete.vim plugins. There is a completion prompt in the markdown file, but when I select it, nothing is added.

Is there any way to solve this problem, or the plugin does not support markdown

Input is blocked when type "/**/

When I edit a vim script file,when I type those:
let l:headers=findfile(l:root_dir . "/**/*
after the "*" is inserted, the input is blocked.

Trigger a file path complete at root dir?
I'm using window10 64bit. gVim 8.2 64bit

here is the vim profiling:


FUNCTIONS SORTED ON SELF TIME
count  total (s)   self (s)  function
    1             38.269694  asyncomplete#sources#file#completor()
  480   0.060005   0.028078  airline#highlighter#get_highlight()
  960              0.028027  <SNR>129_get_syn()
    3   0.111364   0.015857  airline#highlighter#highlight()
  240   0.057060   0.015320  airline#highlighter#exec()
   12   0.007679   0.007658  airline#extensions#fugitiveline#bufname()
   67              0.006821  <SNR>129_GetHiCmd()
    6   0.006388   0.006253  airline#extensions#tabline#formatters#default#format()
  120   0.064977   0.005167  <SNR>129_exec_separator()
  480              0.003901  <SNR>129_get_array()
  240              0.003395  <SNR>129_CheckDefined()
   18   0.115477   0.002157  airline#check_mode()
  173              0.002071  <SNR>129_hl_group_exists()

Vim is frozen when completing with ** pattern

Hi @prabirshrestha,

When I am typing a text like coverage/**/, it triggered file completion but vim is frozen immediately. Maybe it is trying to glob with ** pattern.

Here is minimal vimrc I used to reproduce the issue

set encoding=utf-8
scriptencoding utf-8

set nocompatible
set termguicolors

if &shell =~# 'fish$'
    if executable('zsh')
        let &shell = exepath('zsh')
    elseif executable('bash')
        let &shell = exepath('bash')
    endif
endif

set runtimepath^=~/.vim/plugged/asyncomplete.vim
set runtimepath^=~/.vim/plugged/asyncomplete-file.vim
syntax on
filetype plugin indent on

let g:asyncomplete_auto_popup  = 1
let g:asyncomplete_popup_delay = 100

call asyncomplete#register_source(asyncomplete#sources#file#get_source_options({
            \ 'name':      'file',
            \ 'allowlist': ['*'],
            \ 'priority':  10,
            \ 'completor': function('asyncomplete#sources#file#completor'),
            \ }))

Thanks for awesome complete plugins.

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.