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

tracking issue: Fix directory/file specific layer configuration #14653

Closed
5 of 41 tasks
lebensterben opened this issue Apr 17, 2021 · 4 comments
Closed
5 of 41 tasks

tracking issue: Fix directory/file specific layer configuration #14653

lebensterben opened this issue Apr 17, 2021 · 4 comments
Labels
stale marked as a stale issue/pr (usually by a bot)

Comments

@lebensterben
Copy link
Collaborator

lebensterben commented Apr 17, 2021

As reported in #14652, there's a regression since #14509.

This is a regression we have in multiple languages. We need to add the backend setup function to -local-vars-hook so that people can override a language backend in a given project. See the Emacs documentation on this wonderfully named variable hack-local-variables.

For instance with the following .dir-locals.el at the root of a git repository I can choose to use anaconda instead of lsp (useful for legacy python projects):

;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")

((python-mode . ((python-test-runner . pytest)
(python-backend . anaconda))))

This feature is explained in the README.org files of all the languages supporting multiple backends. Example in the Python README: https://github.com/syl20bnr/spacemacs/tree/develop/layers/+lang/python#choosing-a-backend

Review progress

Not affected:

  • rcirc
  • spacemacs-bootstrap
  • react
  • vue
  • xkcd
  • chinese
  • keyboard-layout
  • spacemacs-editing
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 17, 2021
- Labelled `c-c++-backend` as safe local variable.
- Added local variable hooks of c/c++ modes:
  - `spacemacs//c-c++-setup-clang-format`

All other setup functions are already added to local variable hook.

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 17, 2021
- Labelled `clojure-backend` as safe local variable.
- Added local variable hooks of clojure mode:
  - `spacemacs//clojure-setup-backend`

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 17, 2021
- Labelled `crystal-backend` as safe local variable.
- Added local variable hooks of crystal mode:
  - `spacemacs//crystal-setup-backend`
  - `spacemacs//crystal-setup-company`

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 17, 2021
- Labelled `csharp-backend` as safe local variable.
- Added local variable hooks of csharp mode:
  - `spacemacs//csharp-setup-backend`
  - `spacemacs//csharp-setup-company`
  - `spacemacs//csharp-configure`

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 17, 2021
- Labelled `dart-backend` as safe local variable.

All setup functions are already added to local variable hook.

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 17, 2021
- Labelled `elixir-backend` as safe local variable.
- Added local variable hooks of elixir mode:
  - `spacemacs//elixir-setup-backend`

All other setup functions are already added to local variable hook.

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 17, 2021
- Labelled `elm-backend` as safe local variable.
- Added local variable hooks of elm modes:
  - `spacemacs//elm-setup-backend`
  - `spacemacs//elm-setup-company`

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 17, 2021
- Labelled `erlang-backend` as safe local variable.
- Added local variable hooks of erlang modes:
  - `spacemacs//erlang-setup-backend`
  - `spacemacs//erlang-setup-company`

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 17, 2021
- Labelled `ess-backend` as safe local variable.
- Added local variable hooks of ess modes:
  - `spacemacs//ess-may-setup-r-lsp`

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 17, 2021
- Labelled `fsharp-backend` as safe local variable.
- Added local variable hooks of fsharp mode:
  - `spacemacs//fsharp-setup-backend`

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 17, 2021
- Labelled `go-backend` and `go-format-on-save` as safe local variable.
- Added local variable hooks of go mode:
  - `spacemacs//go-setup-backend`
  - `spacemacs//go-setup-eldoc`
  - `spacemacs//go-setup-format`

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 17, 2021
- Labelled `groovy-backend` as safe local variable.
- Added local variable hooks of groovy mode:
  - `spacemacs//groovy-setup-backend`
  - `spacemacs//groovy-setup-company`

See: syl20bnr#14653
@smile13241324
Copy link
Collaborator

Good catch I will check the commits and merge them one by one.

lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 17, 2021
- Labelled `haskell-completion-backend` as safe local variable.

All setup functions are already added to local variable hook.

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 17, 2021
- Labelled `java-backend` as safe local variable.

All setup functions are already added to local variable hook.

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 17, 2021
- Labelled `javascript-backend`, `javascript-fmt-tool`, and
  `javascript-import-tool` as safe local variables.
- Added local variable hooks of `js2-mode`:
  - `spacemacs//javascript-setup-import-js`
- Improved `spacemacs//javascript-setup-dap`
- Added `spacemacs//javascript-setup-import-js`

All other setup functions are already added to local variable hook.

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 18, 2021
- Labelled `julia-backend` as safe local variable.

All setup functions are already added to local variable hook.

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 18, 2021
- Labelled `kotlin-backend` as safe local variable.
- Added local variable hooks of `kotlin-mode`:
  - `spacemacs//kotlin-setup-backend`
  - `spacemacs//kotlin-setup-company`

All setup functions are already added to local variable hook.

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 18, 2021
- Labelled `latex-backend` as safe local variable.
- Added local variable hooks of `kotlin-mode`:
  - `spacemacs//latex-setup-company`
- Added functions that setup prefix and bindings:
  - `spacmeacs//latex-setup-binding`
  - `spacemacs//latex-reftex-setup-binding`

All setup functions are already added to local variable hook.

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 18, 2021
- Labelled `javascript-backend`, `javascript-fmt-tool`, and
  `javascript-import-tool` as safe local variables.
- Added local variable hooks of `js2-mode`:
  - `spacemacs//javascript-setup-import-js`
- Improved `spacemacs//javascript-setup-dap`
- Added `spacemacs//javascript-setup-import-js`

All other setup functions are already added to local variable hook.

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 18, 2021
- Labelled `fsharp-backend` as safe local variable.
- Added local variable hooks of fsharp mode:
  - `spacemacs//fsharp-setup-backend`

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 18, 2021
- Labelled `elm-backend` as safe local variable.
- Added local variable hooks of elm modes:
  - `spacemacs//elm-setup-backend`
  - `spacemacs//elm-setup-company`

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 18, 2021
- Labelled `haskell-completion-backend` as safe local variable.

All setup functions are already added to local variable hook.

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 18, 2021
- Labelled `lua-backend` and `lua-lsp-server`as
  safe local variable.
- Added functions that setup prefix and bindings:
  - `spacmeacs//lua-setup-binding`

All setup functions are already added to local variable hook.

See: syl20bnr#14653
lebensterben added a commit to lebensterben/spacemacs that referenced this issue Apr 18, 2021
- Fixed a typo in `core-spacebind`
- Labelled `perl5-backend` as safe local variable.
- Added local variable hooks of `perl5-mode`:
  - `spacemacs//perl5-setup-backend`
  - `spacemacs//perl5-setup-company`
  - `spacemacs//perl5-setup-dap`
- Added functions that setup prefix and bindings:
  - `spacmeacs//perl5-setup-binding`
- Moved a ugly chunk of regex to func.el. At the bottom.

See: syl20bnr#14653
@syl20bnr
Copy link
Owner

Taking care of Ruby.

syl20bnr pushed a commit that referenced this issue Apr 22, 2021
- Labelled `dart-backend` as safe local variable.

All setup functions are already added to local variable hook.

See: #14653
syl20bnr pushed a commit that referenced this issue Apr 22, 2021
- Labelled `elixir-backend` as safe local variable.
- Added local variable hooks of elixir mode:
  - `spacemacs//elixir-setup-backend`

All other setup functions are already added to local variable hook.

See: #14653
syl20bnr pushed a commit that referenced this issue Apr 22, 2021
- Labelled `erlang-backend` as safe local variable.
- Added local variable hooks of erlang modes:
  - `spacemacs//erlang-setup-backend`
  - `spacemacs//erlang-setup-company`

See: #14653
wang-d pushed a commit to wang-d/spacemacs that referenced this issue Jul 22, 2021
- Labelled `groovy-backend` as safe local variable.
- Added local variable hooks of groovy mode:
  - `spacemacs//groovy-setup-backend`
  - `spacemacs//groovy-setup-company`

See: syl20bnr#14653
wang-d pushed a commit to wang-d/spacemacs that referenced this issue Jul 22, 2021
- Labelled `go-backend` and `go-format-on-save` as safe local variable.
- Added local variable hooks of go mode:
  - `spacemacs//go-setup-backend`
  - `spacemacs//go-setup-eldoc`
  - `spacemacs//go-setup-format`

See: syl20bnr#14653
wang-d pushed a commit to wang-d/spacemacs that referenced this issue Jul 22, 2021
- Labelled `dart-backend` as safe local variable.

All setup functions are already added to local variable hook.

See: syl20bnr#14653
wang-d pushed a commit to wang-d/spacemacs that referenced this issue Jul 22, 2021
- Labelled `elixir-backend` as safe local variable.
- Added local variable hooks of elixir mode:
  - `spacemacs//elixir-setup-backend`

All other setup functions are already added to local variable hook.

See: syl20bnr#14653
wang-d pushed a commit to wang-d/spacemacs that referenced this issue Jul 22, 2021
- Labelled `erlang-backend` as safe local variable.
- Added local variable hooks of erlang modes:
  - `spacemacs//erlang-setup-backend`
  - `spacemacs//erlang-setup-company`

See: syl20bnr#14653
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Apr 22, 2022
@lebensterben lebensterben removed the stale marked as a stale issue/pr (usually by a bot) label Apr 22, 2022
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Apr 22, 2023
@github-actions github-actions bot closed this as completed Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale marked as a stale issue/pr (usually by a bot)
Projects
None yet
Development

No branches or pull requests

3 participants