Commit graph

43 commits

Author SHA1 Message Date
Henrik Lissner
4063b8d14a
ui/modeline: abbreviate $HOME in buffer id segment 2018-10-30 16:21:54 -04:00
Henrik Lissner
97f8594a71
ui/modeline: refresh +modeline-buffer-state often
This fixes issues where the buffer's modified state isn't reflected
properly in the mode-line, at the expense of a little (but acceptable
loss of) efficiency.
2018-10-18 13:13:35 -04:00
Henrik Lissner
706da14ec9
ui/modeline: fix void-variable evil-visual-* errors
For non-evil users.
2018-10-06 20:44:22 -04:00
Henrik Lissner
f20cfd21c2
Add mouse-over info to modeline segments
Also extracts indentation style info from +modeline-encoding into new
+modeline-indent-style segment.
2018-10-03 02:33:18 -04:00
Henrik Lissner
d9fb1c5ca6 ui/modeline: add support for indirect buffers
Indirect buffer support is still dodgy and needs work (some segments
don't update at all).
2018-09-28 21:13:28 -04:00
Henrik Lissner
53fe7a1f04 Refactor Project API to reflect changes upstream
projectile-project-root no longer returns `default-directory` if not in
a project (it returns nil). As such, doom-project-* functions (and their
uses) have been refactored.

+ doom-project-p & doom-project-root are aliases for
  projectile-project-p & projectile-project-root.
+ doom-project-{p,root,name,expand} now has a DIR argument (for
  consistency, since projectile-project-name and
  projectile-project-expand do not).
+ The nocache parameter is no longer necessary, as projectile's caching
  behavior is now more sane.
+ Removed some projectile advice/hacks that are no longer necessary.
+ Updated unit tests
2018-09-28 21:13:27 -04:00
Henrik Lissner
74af5bde26 ui/modeline: fix buffer file path segment
To cope with changes upstream in the projectile package.
2018-09-22 13:15:12 -04:00
Henrik Lissner
7acece3e0b
Disable projectile mode-line segment
If either module module is active, this is just extra overhead.
2018-09-22 11:47:36 -04:00
Henrik Lissner
77b5571ed9
ui/modeline: fix *invalid* in global-mode-string 2018-09-21 13:33:18 -04:00
Henrik Lissner
0a3334a1f6
ui/modeline: refactor +modeline-encoding segment 2018-09-13 19:15:15 -04:00
Henrik Lissner
3128b830f9
ui/modeline: +modeline-height = 25
+2 to default height
2018-09-09 09:58:23 -04:00
Henrik Lissner
7d3ffdff06
Remove third line in section headers
This is truly important stuff. We've saved many lives with this update.
2018-09-09 09:58:19 -04:00
Henrik Lissner
786ab9e7b5
ui/modeline: show UTF-8 for prefer-utf-8 encoding 2018-09-09 09:58:14 -04:00
Henrik Lissner
f8f9144f08
ui/modeline: add indent type+width to modeline
Also, display nothing for file encoding if encoding is undecided.
2018-09-03 04:05:35 +02:00
Henrik Lissner
3a23ff56cd
General formatting & minor refactors 2018-09-02 17:20:19 +02:00
Henrik Lissner
fdea8ff5ee
ui/modeline: fontify buffer-id default value 2018-09-01 12:40:08 +02:00
Henrik Lissner
712b775f36
Remove doom*set-indirect-buffer-filename hack
This was done to help the modeline build its file path in indirect
buffers, but this has been fixed by using buffer-base-buffer.

Both ui/modeline and ui/doom-modeline have been refactored to
accommodate this.
2018-09-01 12:39:26 +02:00
Henrik Lissner
a005fed274
Fix symlinks in modeline path segment
This would cause a lot of ../'s when opening a symlinked file.
2018-08-27 03:32:42 +02:00
Henrik Lissner
ed8a08226c
ui/modeline: install shrink-path 2018-08-23 17:27:31 +02:00
Henrik Lissner
dc9841b192
ui/modeline: refactor path builder & add other styles
This brings +doom-modeline-buffer-file-name styles to the new modeline
module, controlled by the +modeline-buffer-path-function variable.

The available functions are:

* +modeline-file-path-with-project: project/src/lib/file.c
* +modeline-file-path-from-project: src/lib/file.c
* +modeline-file-path-truncated-with-project: project/s/l/file.c
* +modeline-file-path-truncated-upto-project: ~/w/project/src/lib/file.c
* +modeline-file-path-truncated-upto-project-root: ~/w/p/s/lib/file.c
* +modeline-file-path-truncated: ~/w/p/s/l/file.c
* +modeline-file-name: file.c

The default is file-path-with-project.
2018-08-22 22:36:44 +02:00
Henrik Lissner
6282526743
ui/modeline: fontify project root separately
And add new doom-modeline-buffer-project-root face.
2018-08-22 22:28:53 +02:00
Henrik Lissner
d692718ab4
Fix selecting deleted window error
Caused by focus/unfocus modeline fixes accessing possibly dead buffers.
2018-08-12 18:25:09 +02:00
Henrik Lissner
a24e4f51cd
ui/modeline: refocus after closing any posframe 2018-08-10 19:30:08 +02:00
Henrik Lissner
3e7c85244b
Improve modeline refocusing fixes
By affecting buffers instead of windows
2018-08-10 19:26:56 +02:00
Henrik Lissner
b100fe332b
Slightly larger default +modeline-height (23) 2018-08-10 14:13:48 +02:00
Henrik Lissner
68dc510a1c
Refactor +modeline-file-path
Remove unused letvars and face management.
2018-08-09 12:58:26 +02:00
Henrik Lissner
78e4559465
Move mode-line-misc-info to front of :main rhs
This ensures any extraneous spacing it adds to the mode-line isn't
visible, without compromising plugins' ability to add information to
your modeline.
2018-08-07 22:52:02 +02:00
Henrik Lissner
2a8b3e674a
ui/modeline: refactor focus/unfocus logic
And improves integration with helm
2018-08-06 22:41:44 +02:00
Henrik Lissner
860dff3e63
completion/helm: refactor posframe config 2018-08-05 00:39:54 +02:00
Henrik Lissner
0b130d7b9a
ui/modeline: fix spacing issues with flycheck/vc 2018-08-03 18:07:06 +02:00
Henrik Lissner
76868fe48d
ui/modeline: allow more options for bar 2018-08-03 18:06:44 +02:00
Henrik Lissner
4731f82766
ui/modeline: disable no-checker flycheck indicator 2018-08-02 03:50:51 +02:00
Henrik Lissner
e79111ff54
Eval +modeline-major-mode live
It's a small segment. We can afford it being a little more greedy.
2018-08-01 15:01:27 +02:00
Henrik Lissner
4a14df9254
Add mode-line-process to :main & :special formats 2018-08-01 01:48:22 +02:00
Henrik Lissner
0cdb736670
Default modeline segments to :init
Fixes buffer-id in non-file-visiting buffers.
2018-08-01 01:47:45 +02:00
Henrik Lissner
8272d8e98f
ui/modeline: rpad +modeline-flycheck 2018-08-01 01:14:36 +02:00
Henrik Lissner
fb3d385211
ui/modeline: add flycheck segment 2018-07-31 18:40:54 +02:00
Henrik Lissner
b3f2a8cd54
ui/modeline: minor refactor
Add +modeline-segment-active-p predicate function.
2018-07-31 18:40:30 +02:00
Henrik Lissner
b62e40b10b
ui/modeline: add +modeline-width option 2018-07-31 16:54:38 +02:00
Henrik Lissner
59f869bf5e
ui/modeline: update comments & benchmarks 2018-07-30 23:10:18 +02:00
Henrik Lissner
cbc59f9333
Appease the byte-compiler 2018-07-30 12:10:11 +02:00
Henrik Lissner
55870458e6
Byte-compile mode-line segment :eval forms
Byte-compiled function calls are ~10% faster than evalling quoted forms.
2018-07-30 02:57:50 +02:00
Henrik Lissner
088480047c
Polish & move new modeline into :ui modeline
Removes modeline library out of core-ui and contains them in :ui
doom-modeline and :ui modeline.

:ui modeline will eventually replace :ui doom-modeline, but is still
considered experimental. This update provides makes it much more stable
and closer to being feature complete.
2018-07-29 19:31:32 +02:00