yaegassy / coc-sqlfluff

SQLFluff (A SQL linter and auto-formatter for Humans) extension for coc.nvim
https://www.npmjs.com/package/coc-sqlfluff
MIT License
28 stars 1 forks source link

Installation help #6

Closed jjjchens235 closed 3 years ago

jjjchens235 commented 3 years ago

When installing via vim-plug, i.e like so Plug 'yaegassy/coc-sqlfluff', {'do': 'yarn install --frozen-lockfile'}

I get this output (and error): x Post-update hook for coc-sqlfluff ... Exit status: 127 coc-sqlfluff: Resolving deltas: 100% (27/27), done.

Is this expected behavior?

Also, should this linter work out of the box? Once I have run vim-plug, I wasn't sure if I needed to follow any more steps.

Per the readme I tried :CocCommand sqlfluff.install but I got error coc.nvim error on runcommand sqlfluff.install not found

yaegassy commented 3 years ago

Do you have coc.nvim installed?

e.g. .vimrc/init.vim:

" ...snip
call plug#begin('~/.vim/plugged')
  Plug 'neoclide/coc.nvim', {'branch': 'release'}
call plug#end()
" ...snip

After installing coc.nvim, use :CocInstall coc-sqlfluff to install coc-sqlfluff

To install coc-sqlfluff with vim-plug, yarn needs to be installed in your environment. but :CocInstall is easy to install without yarn.

Then open the sql file and coc-sqlfluff will be available.

jjjchens235 commented 3 years ago

This worked using CocInstall. Thank you!!! May I ask you one more question, I tried reading the docs for sqlfluff but was not able to find the solution to this... The docs talk about a global default config. Does updating the default config file change the settings globally? I don't want to have to create a .config file for every single folder I'm working out of. Where does this default config file live so that I can edit it?

Thank you again for all your help.

yaegassy commented 3 years ago

The location of the global config file can be found in the documentation. https://docs.sqlfluff.com/en/stable/configuration.html#nesting

If you have any questions about sqlfluff, please ask them on the GitHub issue of sqlfluff itself. 🙇

This issue is closed.