Commit graph

46 commits

Author SHA1 Message Date
Ade Attwood
5d825446cc feat(emacs): add status icons to compilation notification
When the compilation notification displays it will now show an icon with the
result of the compilation.
2022-04-09 07:50:34 +01:00
Ade Attwood
66bfdd39b7 refactor(emacs): remove doom-themes and to full base16-themes
This would switch between 'doom-tomorrow' for use with the GUI and
'base16-tomorrow' when using the terminal. Previously the base16 themes has some
issues with GUI emacs and doom was much better. However, since a913143ee when I
forked base16 I have been making small tweaks and don't use the doom themes any
more.

This is now time to remove them and go full base16
2022-03-13 20:43:53 +00:00
Ade Attwood
70b3d16a4b fix(emacs): sort out language tool this was just not working 2022-03-13 20:42:44 +00:00
Ade Attwood
4760acc065 feat(emacs): rebuild format.el
This is the first implementation of the fmt-mode built with 'reformatter'. This
removes the CLI tool that was calling all the different formatters and replaces
it with an emacs mode.

The CLI tool was an attempt to create a common CLI tool to format code. In
reality this just became hard to maintain and was only ever used in the emacs
formatter. To format code in the CLI I was just using the upstream tools.

See: https://github.com/purcell/emacs-reformatter
2022-03-13 20:36:11 +00:00
Ade Attwood
2965923990 fix(emacs): limit supper tag to prog-mode
When my custom tab was getting set on all modes it was not letting me tab in
counsel or any of the command like modes.

This now only uses the supper tab in prog-mode where this really applies.
2022-03-13 20:30:06 +00:00
Ade Attwood
ae2de6a719 feat(emacs): go full quelpa
Move all of the package installation from the default package.el to quelpa. This
has the main advantage of being able to update packages better. I have also got
a few package coming from forks and custom repos.

This also removes all of the `ensure t` from the use-package statements as we
have already set `use-package-always-ensure` so its not needed.
2022-02-19 22:15:11 +00:00
Ade Attwood
589237ea50 feat(emacs): implement super tab
This is a port of the original super tab I had in vim. It has a hierarchy of
checks for actions when using the tab so I can use tab for snippet expanding,
expanding emmet expressions.

Currently this dose not support tab for cycling though completions, and I am
sure there will be some bugs in some situations.
2022-02-19 20:43:21 +00:00
Ade Attwood
bb7671734c refactor(emacs): update the development config
Add clangd config args for the LSP config.

Remove all the custom company ordering and overriding to add in the snippets in
to the completion menu. This was only causing issues, so we now have to remember
what the snippets are. We can think about adding in a select snippet command via
counsel or something if this becomes a bigger issue.

Add in compilation notifications via `notify-send` cli tool. This helps when
testing or compiling is taking a long time an I put it into the background. When
it is done we now get desktop notifications
2022-02-19 20:33:28 +00:00
Ade Attwood
8c0ff15ca4 chore(emacs): remove lsp-treemacs package
Treemacs was remove in 08335fb, this package was left in an needed to be removed
2022-02-19 20:30:24 +00:00
Ade Attwood
5c3892b1a6 feat(emacs): add custom projectile project type
Add a new project type for Practically Makefile projects that are using
conventional tools.

This implements a few features all based around PHP and JavaScript projects. The
most notable features are:

- Compilation error detection for Jest JS testing framework
- Compilation error detection for Psalm PHP static analyser
- Alternate file support for Codeception "Cest" files
- JS test commands supporting "Jest"
- PHP test commands supporting "Codeception", "PHP Unit" and "Simple PHP Unit"
- Full project test support detecting the file type and the test command to run
2022-02-19 20:19:43 +00:00
Ade Attwood
55e3e98701 chore: add languagetool back in
I am sure this was installed before, it must have been removed when I started
making the repo public.

Anyway this adds it all back and also sets up the emacs package for using it
when writing.
2022-02-19 14:43:14 +00:00
Ade Attwood
73ec9f8f3f chore(emacs): org mode updates
Lots of different updates while I am working on refining the Org workflow
2022-02-15 20:51:38 +00:00
Ade Attwood
d29a601b65 feat(emacs): add command for extracting a patch from emails 2022-02-15 20:47:31 +00:00
Ade Attwood
e5877a73da refactor(emacs): ui updates
Moves the setting of the font size onto a function so it can be used
dynamically. This is for when I am moving emacs across monitors with different
DPI's.

Also move base-16-themes to my fork
2022-02-15 20:43:06 +00:00
Ade Attwood
5e7c6e587f chore(emacs): remove ivy-rich package 2022-02-15 20:42:06 +00:00
Ade Attwood
8966cd6155 feat(emacs): use markdown-mode when using edit-server
This is mostly used when editing GitHub and GitLab comments that boath support
markdown. This allows me to have the correct highlighting and snippet support
2022-02-15 20:34:18 +00:00
Ade Attwood
08335fba6a refactor(emacs): replace treemacs with neotree
Neotree has a much smaller foot print for me. This removes a lot of packages
that were not getting uses to intergate it with the lsp and projectile.
2021-11-21 16:49:47 +00:00
Ade Attwood
e4ca0d9ff1 chore(emacs): add vue mode 2021-11-21 16:46:56 +00:00
Ade Attwood
ec7c111e2f feat(emacs): update sh-mode
This adds shellcheck for creating better scripts and bats mode for testing
support.

It also added .env files to the mode list so I get highlighting in .env files
2021-11-21 16:26:25 +00:00
Ade Attwood
0c92f447e8 chore(emacs): big refactor of org-mode
This removes all of the boiler plate code that was copied when fist moving away
from spacemacs and taken from the emacs from scratch config.

There is some inspiration about capturing notes from org-roam and putting them
into a directory for filing before they get put into the wiki.

This is the first move to start managing my notes / life with org-mode and its
started off really nicely. I think this will keep evolving and we can see where
it goes.
2021-11-21 16:21:21 +00:00
Ade Attwood
92c00ca15c refactor(emacs): swap cue for jsonnet
This is the language we are doing mode configuration in at work now. Cue was
nice but still ab bit new and jsonnet has been around for a lot longer. Cue also
works best with go but we are not doing any of that at work so jsonnet was the
winner.
2021-11-21 14:59:56 +00:00
Ade Attwood
9f7d45b489 feat(emacs): add psalm integration for php-mode
Add the flycheck-psalm package and also add `.phpstub` files to be treated as
php files so we get all of the lsp and and syntax highlighting
2021-11-21 14:57:14 +00:00
Ade Attwood
5de5d36cab feat(emacs): add tree-sitter for highlighting
This is mainly for jsx where the base emacs packages dont really do a good job
especially will typescript tsx files.

This is also giving it a go in php mode where I was getting some funky things
happening in doc blocks.
2021-11-21 14:53:45 +00:00
Ade Attwood
0417e30dc7 feat(emacs): add edit-server package for editing in the web browser
When editing code comments on git platforms like github the input is not very
good when trying to input code. A good example of this is when trying to insert
a tab indent and it will tab away from the input you are typing into.

The edit-server package allows you to open an emacs buffer to edit you comment
or issue into. This will solve the tab issues and give you all of your editor
comforts like auto closing brackets and snippets.
2021-11-21 14:43:03 +00:00
Ade Attwood
f8f8203dac chore(emacs): remove custom company sorting 2021-11-21 14:42:18 +00:00
Ade Attwood
aa5ef6ec72 feat(emacs): set the completion in emacs to scroll
When running the compile command in emacs the buffer dose not scroll with the
output by default.

This now set it to follow the output so you can see the full output as it
happened not just the final result.
2021-11-21 14:39:12 +00:00
Ade Attwood
ddb7febaa9 chore(emacs): disable lock files 2021-11-21 14:37:08 +00:00
Ade Attwood
cb1ecc7478 chore(emacs): setup flycheck next checkers for lsp-mode
When using lsp-mode with flycheck it hijacks all of the checkers that have been
defined for all of the languages. When added other checkers they never get used
because they are all overridden by lsp-mode.

This adds a function so we can define checkers per mode then we can have lsp and
another checker that is specific for the language
2021-11-21 13:43:39 +00:00
Ade Attwood
0042a84112 feat(emacs): add fmt mode
This is a format on save code formatter for multiple languages. It is based on
prettier.el but is using a custom cli tool for formatting.

This is the emacs port of format.vim a plugin I created to do formatting in the
same way but for vim.

See: site-modules/core/files/vim/plugin/format.vim
2021-11-21 13:24:29 +00:00
Ade Attwood
0cf4568853 feat(emacs): add zoekt code search integration
This integrates zoekt code search into emacs and ivy with a heavy inspiration on
`counsel-ag`

See: https://github.com/google/zoekt
2021-11-21 13:18:03 +00:00
Ade Attwood
a913143ee8 chore(emacs): fork the base16 theme
This is so we can add and develop some of the missing features of the
theme. After using them for a bit I will start to submit them back upstream in a
PR
2021-11-21 12:41:27 +00:00
Ade Attwood
086c913dbc chore(emacs): update ui when using the GUI 2021-11-21 12:40:48 +00:00
Ade Attwood
653c7af2ae fix(emacs): update notmuch integration
- Pin notmuch to the version that comes with Ubuntu and is installed with apt
- Add org-move capture integration
- Add unread message filter
2021-11-21 12:36:45 +00:00
Ade Attwood
e8bbbae10a feat(emacs): add c and c++ language integration 2021-11-21 12:31:48 +00:00
Ade Attwood
ebd73bcc38 feat(emacs): add file operation functions
This adds file operation command to emacs so you can quickly rename and copy
files.

The problem with the normal copy file if that it misses removing the old buffer
if its a rename and dose not move to the new buffer. This leads to (more than I
like to admit) editing the new file thinking its the old file.

By updating the buffers and automatically switching this prevents this.
2021-11-21 10:38:43 +00:00
Ade Attwood
1270157bdf feat(emacs): completely refactor company and lsp mode
Update the lsp to improve the performance and editing experience. The completion
has been disabled so we can configure it manually to include snippets and file
paths into the company code completion.

Company has been configured to override the tab behaviour to always expand
snippets whenever there is a available snippet. The default behaviour is to
cycle through the completion.
2021-07-10 20:42:41 +01:00
Ade Attwood
ea87574031 chore(emacs): set column width to 80 chars 2021-07-10 20:36:32 +01:00
Ade Attwood
bb66289983 feat(shell): integrate the emacs better into the terminal
There a quite a few fixes and feature here to make the terminal experience of
emacs better. Most of this is only enabled when running in the terminal.

1) Better tmux integration with navigating between splits and also highlighting
the active window between emacs and tmux so you can better see the active window
you are working in.

2) Mouse and clipboard support through the x window manager so "yank" copies
text into the system clipboard

3) Changing the cursor style between insert and normal mode inside the terminal
this is not the case in default evil mode.
2021-07-08 09:03:27 +01:00
Ade Attwood
a5c86ed6f2 fix(emacs): disable web-mode-enable-auto-quoting
This was really annoying when using JSX. When adding a `=` it would always add
in the quotes to make `=""`, this is not good when writing JSX when a lot of the
time you want `={}`. Now that this is disabled I can make the decision of what I
want to add
2021-06-26 21:06:02 +01:00
Ade Attwood
471fb9168d feat(emacs): binding to CTRL-; to add semi colon at the end of the line
Now in insert mode when editing you can add a semi colon at the end of the
current line my pressing CTRL-;. This will then put the cursor after that ready
to continue the line or press enter to start a new line. This is inspired by
some old vim key bindings I had and a vscode plugin called coloniser.
2021-06-26 21:00:10 +01:00
Ade Attwood
6976cfe1fa feat(emacs): add c-sharp support
This is only initial support. Most of the features are built-in to lsp-mode. I
have added some snippets to make my life a bit easier.

There a more tweaks coming but they are general in improving the editing
experience not just targeted at c-sharp.
2021-06-26 20:34:21 +01:00
a3b0be161d feat(emacs): improve vterm config
This forces vterm buffers to be in the evil emacs state to basically
disable evil-mode to make vterm function more like a native terminal
emulator. I have also bound `C-o` to move to the previous buffer to
simulate the jump backward functionality of evil-mode. This seams to
be working better at the moment due to this always exiting the
buffer. Sometimes jump back can move in the same buffer and this is
not want we want when we are in a vterm buffer.
2021-05-16 20:13:11 +01:00
e48e616c6e fix(emacs): create typescript-tsx-mode
When editing typescript jsx files I was previously using rjsx-mode to
get the jsx highlighting and emmet `className` support. This now
splits out the tsx to ts like other packages like spacemacs and doom
do. This gives me better jsx support with typescript and not impacting
the ts mode that dose not play nicely with jsx.

This seems to be working better with the snippets I created for
spacemacs that works with rjsx-mode and override any functions that
need it for typescript-tsx-mode
2021-05-01 14:26:21 +01:00
2562204827 fix(emacs): move custom-set-variables out of the init.el
This is to stop the generated code from cluttering the init.el and it
can now be ignored by git
2021-04-16 20:49:53 +01:00
4296160d7d feat(emacs) add org reveal package 2021-04-16 19:58:03 +01:00
7cf8c3fa53 feat(emacs): add code files to move away from spacemacs
This is the start to move away from spacemacs and to a custom emacs
config
2021-03-16 20:12:46 +00:00