Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another take on projectionist config #1

Closed

Conversation

kelvinst
Copy link

This is just to incremento your PR elixir-editors#451 with the stuff @hauleth commented + some dispatch config.

Also, I changed it so it to change the heuristics option instead of adding the projections on the existent ones, because the way you had it before was not possible to use :Pcd to change directories to the closest mix.exs file.

Thanks!

schnittchen and others added 30 commits December 6, 2018 14:36
* basic folding test

* move matcher over, extract buffer method, example dsl

* support folding on lower lines, give failure message

* add a few examples
This is the suffix used by leex, Erlang's lexer generator.
Issue 459: manual_install.sh creates wrong directory hierarchy.
* add failing try/else spec

* add indent rules for try/else
* rework folding spec helper

* remove elixirElseBlock

* remove unsupported else fold spec
The s:setf() helper function was originally introduced to avoid setting
the filetype multiple times (375e9e1). I believe this covered the case
where a file had an .ex or .exs extension and also include "elixir" in
the shebang line (such that s:DetectElixir() would match and call 'set
filetype' redundantly).

c56bd82 removed the existing &filetype check in s:setf(), relying on the
&filetype global and ftdetect framework to avoid redundant updates.

I believe we can simplify this even further by using just 'set filetype'
in the file extension-based autocommands and including a guard against
(re)setting filetype in s:DetectElixir().

Also, use explicit case-insensitive comparison operators. This isn't a
good place to make assumptions about 'ignorecase'.
Why
---

I want to be able to differentiate between ordinary delimiters and
those used for docs

How
---

* Add doc syntax specs
* Add **elixirDocSigilDelimiter** group
* Add **elixirDocStringDelimiter** group
* Link **elixirDocStringDelimiter** and **elixirDocStringDelimiter** to
  **elixirStringDelimiter** and **elixirSigilDelimiter** to preserve
  existing behavior
'formatoptions' is already set (to these same values) on line 35.

Also, add 'fo<' to the 'b:undo_ftplugin' list.
'setfiletype' is nice in these cases because it prevents &filetype from
being set redundantly.

Note that the Vim runtime ships with a filetype match for *.ex (for
Euphoria), but our plugin-based filetype detection still gets the last
say.

Also, use 'setlocal' when setting &filetype in the shebang detection
path. We don't want to use 'setfiletype' here because it's possible we
need to override an existing syntax assignment, and we already guard
against setting &filetype to 'elixir' twice.
Why
---

I want to be able to differentiate between public and private
declarations

How
---

* Add **elixirPrivateFunctionDeclaration** group
* Add **elixirPrivateRecordDeclaration** group
* Add **elixirPrivateMacroDeclaration** group
* Link **elixirPrivateFunctionDeclaration** to
  **elixirFunctionDeclaration** to preserve behavior
* Link **elixirPrivateRecordDeclaration** to **elixirRecordDeclaration**
  to preserve behavior
* Link **elixirPrivateMacroDeclaration** to **elixirMacroDeclaration**
  to preserve behavior
* Add **elixirPrivateFunctionDeclaration**,
  **elixirPrivateRecordDeclaration**, and
  **elixirPrivateMacroDeclaration** to **elixirDeclaration** cluster
Added to `elixirModuleDeclaration` the exact same regex used in
`elixirFunctionDeclaration`.
Vim 8 reads plugins from `~/.vim/pack/my-packages/start/pluginName`
* feat: vim-dadbod integration for applications using Ecto

[vim-dadbod][1] is useful library for interacting with databases, this
PR adds support for interacting with applications that are using Ecto
with `Ecto.Adapter.Postgres` and `Ecto.Adapter.MySQL`, thanks to that
user can run:

    :DB ecto:MyApp.Repo SELECT * FROM foo

And it will open new preview window containing result of the query or
even one can use

    :DB ecto:MyApp.Repo

To open interactive shell for DB assigned to given repository.

[1]: https://github.com/tpope/vim-dadbod

* docs: include informations about integration in README
* syntax: Align matches in elixirDocString

Broken since cec4aad.

* test: retab spec/syntax/doc_spec.rb

* syntax: Allow escaping of doc heredocs

Use the same end pattern as normal heredocs.

Fixes elixir-editors#469
…ditors#490)

* Add Phoenix LiveEEx Template (.leex) file type support.
Add LiveView sigil (~L"""LiveView""") support in .ex.
Update README.md

* update leex indentation and syntax specs
removed duplicated live view sigil spec

* fix leex test bugs
@kelvinst kelvinst force-pushed the projectionist-support branch 2 times, most recently from 9f87860 to 74b47f1 Compare August 21, 2019 20:29
kelvinst and others added 25 commits August 21, 2019 18:37
When including other syntax types it's necessary to declare that we're
the main syntax, otherwise they will apply their own syn sync settings.

Here, by including html.vim in 7e00da6,
we end up with syn sync minlines=10 maxlines=100 and we sync using
html.vim syncing rules, which isn't at all what we want. Try opening
large_file.ex in the middle, syntax will be incorrect.
Unfortunately the main_syntax trick doesn't prevent javascript.vim from
doing syn sync fromstart. This is most likely a bug in javascript.vim
and I'll submit a pull request to vim to fix this. Luckily setting
main_syntax does prevent javascript.vim from introducing its own syncing
rules, it just overrides minlines and maxlines, so we can work around it
by moving the syn sync minlines to the end.
Most (if not all) syntax files unconditionally set b:current_syntax at
the end, so we need to unlet it, otherwise the second inclusion is
skipped.
I submodule this repo to use it with pathogen and it keeps breaking when I update because of untracked content in the submodule. This should fix the issue
On some systems, bash does not lie under /bin/. For instance, NixOS.
Implementation from elixir-editors#506

cc: Thanks @w-sanches
@kelvinst kelvinst force-pushed the projectionist-support branch from 74b47f1 to f8890cf Compare September 24, 2020 19:04
@kelvinst
Copy link
Author

kelvinst commented Apr 6, 2021

Closing it as I just don't use my projectionist config like that anymore.

@kelvinst kelvinst closed this Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.