Commit graph

157 commits

Author SHA1 Message Date
Ade Attwood
060fa3d5f9 refactor(emacs): update folder structure to move melpa out of the repo
When I was linking the whole .emacs.d directory all of the junk that gets put
into that directory was getting put into the dotfiles repo and accessible by
puppet. This was slowing things down quite alot. Now I am only linking the
directories I need into the .emacs.d
2021-11-21 19:11:44 +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
15906dc25d fix(shell): fzf escaping 2021-11-21 16:43:41 +00:00
Ade Attwood
075a167376 fix(shell): fshow command with delta
When running fshow we are piping it into less. This was interfering with delta
and loosing the formatting.

This removes the pipe and lets delta handle the paging in the default way with
all the highlighting.
2021-11-21 16:40:53 +00:00
Ade Attwood
74cffd7591 chore(tmux): updates to the term mode
I cant really remember what this is doing but it looks like it something to do
with terminal colors.
2021-11-21 16:32:08 +00:00
Ade Attwood
dac5bfa299 feat(shell): record missing commands
This is so we can later add some alias for commands I frequently get incorrect
2021-11-21 16:30:43 +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
d4c96992ad refactor(shell): remove emacs zsh plugin and create my own
This dose the same thing as the built in oh-my-zsh plugin but this one can
update the paths to emacs that it will be used.

This will allow you to use a custom compiled version of emacs for testing and /
or pinning the version you want with the features you need.
2021-11-21 16:13:12 +00:00
Ade Attwood
bc512c7e5d feat(shell): add my-clone command for cloning git repertories
When cloning a repo I have all of the repertories structured on the file system
by "host" "group" then "name". This command will automatically clone the repo
into the correct directory based on the name and the move into the cloned repo
directory.

An example of a repo to be cloned is the dotfiles repo has the URL of
`git@gitlab.com:AdeAttwood/dotfiles.git` so on the file system it will be in the
source directory `gitlab.com/AdeAttwood/dotfiles`. This keep all of the repos
well structured and searchable.
2021-11-21 16:06:21 +00:00
Ade Attwood
13845d5098 fix(shell): git recommit command
When running git commit it was supposed to update the commit message you are
currently working on. When running commit with git hooks setup the commit may
fail due to a invalid message.

This now splits out the command so you can run `grc` (git recommit) to reedit
the commit message that failed rather then having to enter the message again in
a new commit message.
2021-11-21 15:58:55 +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
99dd45aa08 chore(emacs): add key binding for org-capture 2021-11-21 13:33:04 +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
05902b7461 refactor(shell): update gl alias
This will now display the date and author of the commit in the one line log
2021-11-21 11:42:21 +00:00
Ade Attwood
31ab535f8e chore(emacs): add quick command for lsp actions 2021-11-21 11:03:44 +00:00
Ade Attwood
a064375c2b feat(shell): add comby shell aliases
The main reason for this is to automatically exclude common directories form the
search and replace to speed things up a bit.
2021-11-21 11:01:40 +00:00
Ade Attwood
0aad3a6601 chore(emacs): finally move over the php html snippets 2021-11-21 10:56:43 +00:00
Ade Attwood
404df4b3db feat(git): move to delta diff for diff in the terminal
Now when using git diff it will use delta for a much nicer diff format. This is
set for the show and log commands too.

See: https://github.com/dandavison/delta
2021-11-21 10:52:35 +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
956a8e1986 fix(pp): update oh-my-zsh to use vcsrepo
oh-my-zsh will now use vcsrepo to install the package. This will now keep it up
to date with the master branch. I don't think this package has been updated in
quite some time.
2021-07-18 13:57:04 +01:00
Ade Attwood
034ae2d143 feat(shell): override "gc" alias to open up the ".git/COMMIT_EDITMSG"
When using tools like commitlint to lint your commits there is always that time
you write an invalid commit. In this situation you are dumped back into the
terminal with an error message and your invalid commit.

This function will now load the invalid commit message back in to the editor so
you can fix the errors and commit successfully.
2021-07-14 14:24:17 +01:00
Ade Attwood
a4d9fb370f fix(shell): ensure to use emacs in the terminal when using git commands 2021-07-14 14:23:20 +01:00
Ade Attwood
385829ea8b fix(shell): re alias gs to gss
Now the `gs` command has be aliased to a git status alias. The original `gs`
would open up ghost script and I would open it everyday trying to run git
status.
2021-07-10 21:21:24 +01:00
Ade Attwood
e5655ed216 refactor(shell): refactor ggpushmr git alias
ggpushmr has now been renamed to ggpushpr. The only place it is called a "Merge
Request" is in Gitlab. All the community has now decided to go with Github's
"Pull Request".

This also makes the branch param optional. If you don't pass a branch name it
will make the pull request against the repositories default branch.
2021-07-10 21:12:13 +01:00
Ade Attwood
208b1e542d refactor(shell): go back full terminal
After a long while in emacs gui trying the terminal inside emacs and using the
external terminal with tmux. I have now decided to back full terminal using
emacs in the terminal in a tmux pain, sort of the same way I was using vim
before I switched to emacs.
2021-07-10 20:57:09 +01: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
8df6f7e798 fix(emacs): js import snippet had a syntax error in it 2021-06-26 20:58:56 +01:00
Ade Attwood
6540bdf68d refactor(emacs): load in c-sharp config
This was missed in a previous commit.
2021-06-26 20:55:22 +01:00
Ade Attwood
67630dcbbf feat(shell): add dkip alias to the ip address of a container
This alias will inspect a container and pull out the ip address so you can get
to it on the network without having to bind ports.
2021-06-26 20:47:25 +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
Ade Attwood
bfe7d7af2a feat(bin): add merge-patch script 2021-06-25 05:55:03 +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