Commit graph

11044 commits

Author SHA1 Message Date
Jeetaditya Chatterjee
0c2f986708
feat(:lang): enable ts text objs in modes 2022-05-22 21:26:03 +01:00
Jeetaditya Chatterjee
2cd40f7aa7
fix(tree-sitter): properly gatekeep ts text objs
before today all text objects were bound in all modes, now they have
been properly gatekept and only appear when `+tree-sitter-keys-mode` is
enabled / hooked, this allows for more flexibility and the ability to
arbitrarily disable / enable tree sitter text objects (which is nice)
2022-05-22 21:26:03 +01:00
Jeetaditya Chatterjee
66012fb413
bump: :tools tree-sitter
emacs-tree-sitter/elisp-tree-sitter@4d9871d239 -> emacs-tree-sitter/elisp-tree-sitter@8bbbfa4fc5
emacs-tree-sitter/tree-sitter-langs@fa47b55f7b -> emacs-tree-sitter/tree-sitter-langs@86a894a617
meain/evil-textobj-tree-sitter@eedc1f5461 -> meain/evil-textobj-tree-sitter@4d79ea7121
2022-05-22 21:26:03 +01:00
Jeetaditya Chatterjee
2a7442da74
nit(tree-sitter): cleanup
remove dead lines
remove old code comments
add in hack... thingy?
2022-05-22 21:26:02 +01:00
Jeetaditya Chatterjee
32bf2ee4cf
fix(tree-sitter): message raised when jumping up
as opposed to a nasty error,
the error was raised because I was not using the abs of count
this commit also comes with general code cleanup,
this includes
- removal of the eval quasiquote antipattern when an apply would work
better
- use of the :key keyword instead of the lambda
2022-05-22 21:26:02 +01:00
Jeetaditya Chatterjee
6127692848
fix(fold): handle bounding error
This basically stops the "not overlay" error we were getting when you
tried to jump to many times. this does have the disadvantage of not
jumping at all if the amount of jumps is higher than the amount of
overlays but this can be fixed in a future commit if necessary.
2022-05-22 21:26:02 +01:00
Jeetaditya Chatterjee
c16e16e92b
feat(fold): define ts-fold movement logic
As ts-fold does not provide fold movement logic I made my own. This can
and probably should be upstreamed but the details for that are not clear
2022-05-22 21:26:02 +01:00
Ellis Kenyo
f39fb3afc1
fix(tree-sitter): adjust description for textobjs
Reduce the length of the description for evil text objects
2022-05-22 21:26:02 +01:00
Jeetaditya Chatterjee
caa64e8324
feat(fold): change ts-fold replacement face
this is to make it similar to hideshow
2022-05-22 21:26:02 +01:00
Jeetaditya Chatterjee
7b9d00d661
feat(tree-sitter): add ts to open/close all
also refactor +fold-open-all, +fold-close-all to use cond instead of the
when case for vimish fold.
2022-05-22 21:26:01 +01:00
Jeetaditya Chatterjee
c3e360eeaa
tweak(tree-sitter): add tree sitter check to foldp
instead of just checking if ts-fold is enabled I also check i
tree-sitter mode is actually enabled if not it will move onto hidehshow
2022-05-22 21:26:01 +01:00
Jeetaditya Chatterjee
c1f640209a
feat(fold): add ts-fold support to wrappers
Changes:
- add +fold--ts-fold-p which only checks if the feature is around
- add ts-fold into +fold/toggle, +fold/open, +fold/close
- update doc strings
2022-05-22 21:26:01 +01:00
Jeetaditya Chatterjee
83d22fe5ef
feat(fold): add ts-fold 2022-05-22 21:26:01 +01:00
Jeetaditya Chatterjee
8d27b2bf90
nit(tree-sitter): remove outdated comments 2022-05-22 21:26:01 +01:00
Jeetaditya Chatterjee
547860e847
docs(tree-sitter): add doctor checks for flag
add in a check ala lsp, this has been applied to every module with tree
sitter support
2022-05-22 21:26:00 +01:00
Jeetaditya Chatterjee
06ed5ade3f
refactor!(tree-sitter): add +tree-sitter flag
BREAKING CHANGE: break the global nature of the tree sitter
module by adding a +tree-sitter flag to every applicable module

In the background this hooks turn-on-tree-sitter-mode
to the major-mode-hook of the language.
This may also solve the eager loading of tree sitter
2022-05-22 21:26:00 +01:00
Jeetaditya Chatterjee
400d8d4116
feat(tree-sitter): bind textobjects to maps
Instead of binding all of the tree sitter text objects to every map
we only bind them to modes in the major-mode-language-alist
2022-05-22 21:26:00 +01:00
Jeetaditya Chatterjee
3fdd688356
feat(tree-sitter): ts-langs eagar loads on daemon
as ts-langs is quite heavy it makes sense to eagar load it when in
daemon mode to make the experience smoother overall
2022-05-22 21:26:00 +01:00
Jeetaditya Chatterjee
4eeb45f80b
fix(tree-sitter): lazy load tree-sitter-langs
Some how for some reason tree-sitter-langs managed to load. If if put
its require in the block of a lazy loaded package. it would load.
If i were to set its use-package call to load it after a lazy loaded
package. it would load.

a hook (and disabling it) were the only reliable ways to get it to lazy
load
2022-05-22 21:26:00 +01:00
Jeetaditya Chatterjee
4552064a5a
refactor(tree-sitter): move ts-langs into use-pkg
Move tree-sitter-langs into its own use-package call

This is to reflect an accepted code pattern seen in the rest of doom's
code.

This does not cause any user facing changes
2022-05-22 21:26:00 +01:00
Jeetaditya Chatterjee
cb269deed6
feat(tree-sitter): add function call text object
Changes:
- Bind `F` to the function call text object
- Add the text object to the table
- Realign table so it looks right to people who don't hide emphasis
markers
2022-05-22 21:25:59 +01:00
Jeetaditya Chatterjee
c0637e9e00
bump: :tools tree-sitter
emacs-tree-sitter/elisp-tree-sitter@588170ffbd -> emacs-tree-sitter/elisp-tree-sitter@4d9871d239
emacs-tree-sitter/tree-sitter-langs@81adcdc06a -> emacs-tree-sitter/tree-sitter-langs@fa47b55f7b
meain/evil-textobj-tree-sitter@fe4d738486 -> meain/evil-textobj-tree-sitter@eedc1f5461
2022-05-22 21:25:59 +01:00
Jeetaditya Chatterjee
9a34308246
bump: :tools tree-sitter
emacs-tree-sitter/elisp-tree-sitter@c7a1c34549 -> emacs-tree-sitter/elisp-tree-sitter@588170ffbd
emacs-tree-sitter/tree-sitter-langs@e7b8db7c40 -> emacs-tree-sitter/tree-sitter-langs@81adcdc06a
meain/evil-textobj-tree-sitter@f20598676f -> meain/evil-textobj-tree-sitter@fe4d738486
2022-05-22 21:25:59 +01:00
Jeetaditya Chatterjee
e72930c433
docs(tree-sitter): add better wording to readme 2022-05-22 21:25:59 +01:00
Daanturo
76d38ddc63
refactor(tree-sitter): remove doom-tree-sitter-fail-gracefully-a
Use turn-on-tree-sitter-mode instead of tree-sitter-mode directly
because the former now ignore errors.
2022-05-22 21:25:59 +01:00
Jeetaditya Chatterjee
56432f1649
test(tree-sitter): remove test.js
It does not belong in the module or the repo
2022-05-22 21:25:59 +01:00
Jeetaditya Chatterjee
6dd678a53c
docs(tree-sitter): mention text object bindings 2022-05-22 21:25:58 +01:00
Jeetaditya Chatterjee
727fcb2fcc
nit(tree-sitter): add rationale for debug mode var 2022-05-22 21:25:58 +01:00
Jeetaditya Chatterjee
afb1694b2b
docs(tree-sitter): add links to support in feature
- Add two feature subsections discussing with links to
  - languages that have parsers
  - languages that have highlighting support
  - languages that have text object support and what text objects they
  - have support for
- Fix capitalisation
2022-05-22 21:25:58 +01:00
Jeetaditya Chatterjee
9251ea9db7
docs(tree-sitter): add doctor check for modules
modules support it required by tree sitter to work.
2022-05-22 21:25:58 +01:00
Jeetaditya Chatterjee
b610b47b90
docs(tree-sitter): make wording more verbose
include 'like other text objects' to draw similarities and make the use
case clear
2022-05-22 21:25:57 +01:00
Jeetaditya Chatterjee
145d75eaaa
fix(tree-sitter): bind text-objs to keys 2022-05-22 21:25:57 +01:00
Jeetaditya Chatterjee
74a444db00
fix(tree-sitter): feature gate evil-textobj-ts
where ts stands for tree sitter

Only install 'evil-textobj-treesitter' if :editor evil +everywhere is
enabled

Also Comment which text objs are not currently not working
2022-05-22 21:25:57 +01:00
Jeetaditya Chatterjee
862e7980d8
module: add :tools tree-sitter
This module installs 'tree-sitter' and 'tree-sitter-langs' as well as
the 'evil-textobj-treesitter' and configures them.

This module is based on the prototype module that @hlissner has started
and I am just fleshing out that work.

It also comes with a README file

Fix: #4151
2022-05-22 21:25:57 +01:00
Henrik Lissner
8a27eb99be
perf(org): optimize org-roam node listings
org-roam-get-keyword performs some file IO to read file keywords from
all nodes. This can be slow with long node lists. With
org-roam/org-roam#1963, file title is baked into the schema, so we don't
need to do this work anymore.

Ref: org-roam/org-roam#1963
Fix: #6382
2022-05-09 15:43:32 +02:00
Itai Y. Efrat
258104f750 refactor(lsp): remove emacs 26 workarounds 2022-05-05 02:19:52 +02:00
Colin Woodbury
6bf725837d fix(fortran): account for spaces in filenames 2022-04-26 03:58:14 +02:00
Samuel Tschiedel
488ad07cc5 fix(evil): define *-any-quote directly
Defining `*-any-quote` objects via the exiting `*-block` helpers leads
to incorrect behaviour, where the trailing boundary is also included as
part of the selection (cursor on `|`, selection between `|`):

```
start: "te|st"
v i q: "|test"|
```

The expected behaviour is the same as `v i "`:
```
start: "te|st"
v i q: "|test|"
```

Fix: #5698
2022-04-25 16:38:40 +02:00
Henrik Lissner
65ff263668
fix(vertico): backspace keybind for tty users
The input event, [backspace], is only emitted in GUI Emacs, not TTY
Emacs.

Ref: https://discourse.doomemacs.org/t/2491/3
2022-04-22 23:36:05 +02:00
Henrik Lissner
c183aa7174
fix(everywhere): inhibit local-vars hooks
Indirectly suppresses LSP (and other) servers, which will likely not
function correctly in emacs-everywhere's temp buffers anyway.
2022-04-22 23:36:05 +02:00
Itai Y. Efrat
7640631300 docs(bidi): fix #+DATE field in readme 2022-04-22 16:01:42 +02:00
iyefrat
d41cff489f
module: add :input bidi
* module: add :input bidi

Co-authored-by: Yoav Marco <yoavm448@gmail.com>

* docs(bidi): flesh out README.org

Co-authored-by: Itai Y. Efrat <itai3397@gmail.com>

* feat(bidi): add +bidi-global-mode

* docs(bidi): improve font setting instructions

* feat(bidi): add +bidi-(hebrew|arabic)-font

Since the Hebrew and Arabic unicode blocks cover the vast majority of
RTL languages used today, we provide these fonts so end users don't have
to bother with setting up the hooks themselves.

* feat(bidi): add smart fontify

Adds support for using the bidi fonts on surrounding whitespace and
punctuation through. On by default, customizable through
+bidi-want-smart-fontify and +bidi-smart-fontify-keywords.

Also adds face versions of the bidi fonts.

* docs(bidi): recommend known good nastaliq fonts

* fix(bidi): re-set bidi faces after changing fonts

* feat(bidi): add +bidi-paragraph-direction

This allows users to choose what bidi-paragraph-direction is set to when
+bidi-mode is on, so they can choose if they want per paragraph
alignment (the default) or to force everything to be aligned RTL

* docs(bidi): conform to verbatim/code conventions

* docs(bidi): add font overview to Features

* docs(bidi): warn on rtl forced alignment footgun

+bidi-paragraph-direction is a nice variable to have if you primarily
use +bidi-mode for rtl text buffers, but it shouldn't be used in
conjunction with +bidi-global-mode since it messes up English buffers.

Co-authored-by: Yoav Marco <yoavm448@gmail.com>
2022-04-22 00:21:32 +02:00
pancho horrillo
f51a2cdd3a
fix(python): usage of obsolete alias letf
Amend: 04b76fd0ce
2022-04-18 18:14:16 +02:00
Henrik Lissner
04b76fd0ce
fix(python): HTTP request from pip-requirements-mode
pip-requirements-mode fetches the pypi.org package list via HTTP
request, which blocks. This can sometimes take unbearably long in cases
where the user has a slow or no internet connection.

This fix defers this behavior until the first time completion is
invoked.

Fix: #5998
2022-04-17 03:23:40 +02:00
Henrik Lissner
f7e127af58
revert: gnuplot
emacs-gnuplot/gnuplot@7be3c7adde -> emacs-gnuplot/gnuplot@7138b139d2

This package was accidentally bumped in 48658d2136. The original
issue (#6080) has not been resolved upstream.

Fix: #6080
Ref: #6090
Amend: 48658d2136
2022-04-17 03:23:40 +02:00
Eric Dallo
d9e66630b5 feat(clojure): improve default variables when +lsp 2022-04-16 18:12:52 +02:00
Itai Y. Efrat
6fc5fe56f2 docs(go): add doctor check for gopls executable 2022-04-16 18:10:37 +02:00
Itai Y. Efrat
7b7940bb37 docs(go): disable gocode doctor check if lsp is on 2022-04-16 18:10:37 +02:00
Colin Woodbury
d501b48f2e docs(fortran): show how to install Intel Fortran 2022-04-16 02:48:24 +02:00
Colin Woodbury
f64a61a7e1 feat(fortran): keymappings for Intel 2022-04-16 02:48:24 +02:00