Code Monkey home page Code Monkey logo

defx-git's Introduction

Hi there ๐Ÿ‘‹

Kristijan's github stats

Top Langs

defx-git's People

Contributors

hrsh7th avatar jjohnson338 avatar kristijanhusak avatar lukas-reineke avatar rafi avatar roachsinai avatar tabris233 avatar

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  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

defx-git's Issues

Custom filename column for custom highlighting

One of the things I missed the most form nerdtrees-git-status plugin was the ability to highlight files based on their status.

For example:
screen shot 2019-01-15 at 12 11 46 pm

If a file is part of gitignored, it can be grayed out, if there's a new file, it can be colored yellow, and modified files can be cyan.

Any thoughts on modifying the filename column from defx add this? I can try to make a PR if you are interested.

different status for different name

a folder have one file, a.vim,

after copy, paste, a.vim already exists. Overwrite? rename to a2.vim

10-09_19:43:05

after copy, paste, a.vim already exists. Overwrite? rename to a.vim2

10-09_19:43:38

a.vim never change, why have status?

'columns': 'icons:indent:filename:git:type'

call defx#custom#column('git', 'indicators', {
  \ 'Modified'  : 'M',
  \ 'Staged'    : '+',
  \ 'Untracked' : 'N',
  \ 'Renamed'   : 'โžœ',
  \ 'Unmerged'  : 'โ•',
  \ 'Ignored'   : 'โ˜’',
  \ 'Deleted'   : 'โœ–',
  \ 'Unknown'   : '?'
  \ })

> git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)
  a.vim2

nothing added to commit but untracked files present (use "git add" to track)

KeyError: Delete

Hi there! Looks like there's an error that happens when you delete some files in git.

Error detected while processing function defx#_do_action[6]..defx#util#rpcrequest[15].._defx_do_action[1]..remote#define#request:
line    2:
error caught in request handler '/Users/mhartington/GitHub/defx.nvim/rplugin/python3/defx:function:_defx_do_action [['drop', [], {'columns': 'mark:filename:typ
e', 'auto_cd': False, 'prev_bufnr': 2, 'resume': False, 'listed': False, 'new': False, 'fnamewidth': 100, 'direction': '', 'winheight': 0, 'profile': False, 's
earch': '', 'buffer_name': 'default', 'winwidth': 0, 'split': 'no', 'cursor': 7, 'toggle': False}]]':
Traceback (most recent call last):
  File "/Users/mhartington/GitHub/defx.nvim/rplugin/python3/defx/__init__.py", line 41, in do_action
    self._rplugin.do_action(args)
  File "/Users/mhartington/GitHub/defx.nvim/rplugin/python3/defx/rplugin.py", line 37, in do_action
    view.do_action(args[0], args[1], args[2])
  File "/Users/mhartington/GitHub/defx.nvim/rplugin/python3/defx/view.py", line 324, in do_action
    ret = action.do_action(self, defx, action_name, context)
  File "/Users/mhartington/GitHub/defx.nvim/rplugin/python3/defx/action.py", line 38, in do_action
    action.func(view, defx, context)
  File "/Users/mhartington/GitHub/defx.nvim/rplugin/python3/defx/action.py", line 236, in _drop
    view.cd(defx, str(path), context.cursor)
  File "/Users/mhartington/GitHub/defx.nvim/rplugin/python3/defx/view.py", line 281, in cd
    self.redraw(True)
  File "/Users/mhartington/GitHub/defx.nvim/rplugin/python3/defx/view.py", line 235, in redraw
    for x in self._candidates
  File "/Users/mhartington/GitHub/defx.nvim/rplugin/python3/defx/view.py", line 235, in <listcomp>
    for x in self._candidates
  File "/Users/mhartington/GitHub/defx.nvim/rplugin/python3/defx/view.py", line 251, in get_columns_text
    text += column.get(context, candidate)
  File "/Users/mhartington/.config/nvim/.cache/init.vim/.dein/rplugin/python3/defx/column/git.py", line 52, in get
    self.indicators[self.get_indicator_name(entry[0], entry[1])]
KeyError: 'Deleted'

Will look into this, but figured I'd pass it along.

Cheers!

Hightlighting problem

In the README file ,highlight is config like :

hi Defx_git_Untracked guibg=NONE guifg=NONE ctermbg=NONE ctermfg=NONE
hi Defx_git_Ignored guibg=NONE guifg=NONE ctermbg=NONE ctermfg=NONE
hi Defx_git_Unknown guibg=NONE guifg=NONE ctermbg=NONE ctermfg=NONE
hi Defx_git_Renamed ctermfg=214 guifg=#fabd2f
hi Defx_git_Modified ctermfg=214 guifg=#fabd2f
hi Defx_git_Unmerged ctermfg=167 guifg=#fb4934
hi Defx_git_Deleted ctermfg=167 guifg=#fb4934
hi Defx_git_Staged ctermfg=142 guifg=#b8bb26

But when I used it , highlight does not work I have to change the config file to :

hi Defx_git_0_Untracked ctermfg=12 guifg=#81a2be
hi Defx_git_0_Ignored   ctermfg=8  guifg=#404660
hi Defx_git_0_Unknown   ctermfg=3  guifg=#f0c674
hi Defx_git_0_Renamed   ctermfg=3  guifg=#de935f
hi Defx_git_0_Modified  ctermfg=9  guifg=#cc6666
hi Defx_git_0_Unmerged  ctermfg=14 guifg=#8abeb7
hi Defx_git_0_Deleted   ctermfg=13 guifg=#b294bb
hi Defx_git_0_Staged    ctermfg=10 guifg=#b5bd68

Don't know why.

defx_git#indicators issue

Problems summary

:Defx command produces blank buffer on first try, works on second try

Environment Information

  • OS: Windows 10

  • neovim/Vim version:
    image

VIMRC

call plug#begin('~/.vim/bundle') "plugins' root path

Plug 'Shougo/defx.nvim'
Plug 'kristijanhusak/defx-icons'
Plug 'kristijanhusak/defx-git'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'


" All of your Plugs must be added before the following line
call plug#end()            " required

Screen shot (if possible)

first time(blank)
image

Second time(works):
image

Log
image

[help] [defx] Vim(call):E964: Invalid column number: 4

After I install defx-git when I write buffer with defx shows get error: [defx] Vim(call):E964: Invalid column number: 4.

If I disable defx-git, not error report when writing file buffer.

my relate setting is:

silent! call defx#custom#option('_', {
      \ 'winwidth': 25,
      \ 'split': 'vertical',
      \ 'direction': 'topleft',
      \ 'show_ignored_files': 0,
      \ 'buffer_name': 'defxplorer',
      \ 'columns': 'indent:git:icons:filename',
      \ 'toggle': 1,
      \ 'resume': 1,
      \ 'listed': 1,
      \ 'root_marker': 'โ‰ก '
      \ })

Is there anything wrong with my setting?

Broken with the latest defx.

If user don't set these group will be broken, So should be add a default link

hi Defx_git_Untracked guibg=NONE guifg=NONE ctermbg=NONE ctermfg=NONE
hi Defx_git_Ignored guibg=NONE guifg=NONE ctermbg=NONE ctermfg=NONE
hi Defx_git_Unknown guibg=NONE guifg=NONE ctermbg=NONE ctermfg=NONE
hi Defx_git_Renamed ctermfg=214 guifg=#fabd2f
hi Defx_git_Modified ctermfg=214 guifg=#fabd2f
hi Defx_git_Unmerged ctermfg=167 guifg=#fb4934
hi Defx_git_Deleted ctermfg=167 guifg=#fb4934
hi Defx_git_Staged ctermfg=142 guifg=#b8bb26

Collision with vim-fugitive

defx-git and vim-fugitive appear to be colliding with one another on the index file. I've created an issue with fugitive as well.

Error detected while processing BufReadCmd Autocommands for "index{,.lock}":
fugitive: sh /s: No such file or directory

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.