diff options
Diffstat (limited to 'Emacs/.config/emacs')
-rw-r--r-- | Emacs/.config/emacs/config.org | 68 |
1 files changed, 33 insertions, 35 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 8f748b8..1935d20 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -115,7 +115,7 @@ files on after-save-hook. (add-hook 'after-save-hook (quote ,func-name))))) #+end_src ** Procedure -The =lambda= macro provides a function with possible arguments. A +The ~lambda~ macro provides a function with possible arguments. A procedure is a type of form that takes no arguments. This macro returns an anonymous function with no arguments with all the forms provided. It returns it in 'backquoted' form as that is the most @@ -221,8 +221,8 @@ the borders for Emacs. Incredible, must be done. ** General Setup general, a good package for defining keys. In this case, I generate a new definer for the "LEADER" keys. Leader is bound to -=SPC= and it's functionally equivalent to the doom/spacemacs leader. -Local leader is bound to =SPC ,= and it's similar to doom/spacemacs +~SPC~ and it's functionally equivalent to the doom/spacemacs leader. +Local leader is bound to ~SPC ,~ and it's similar to doom/spacemacs leader but doesn't try to fully assimilate the local-leader map instead just picking stuff I think is useful. #+begin_src emacs-lisp @@ -445,7 +445,7 @@ Along with frameworks, there is a configuration for the completions-list, which is actually the original and default method of completion within Emacs. When you first install Emacs without a config, any 'completing-read' function leverages the completions-list when -=TAB= is used. +~TAB~ is used. Though I believe Ido is a better completion system than the completions-list, it still has it's place and can be used in tandem @@ -766,7 +766,7 @@ that makes it easy to manage the various buffers created by packages. forms))))) #+end_src *** Setup default display records -Using the =:display= keyword, setup up some =display-buffer-alist= +Using the ~:display~ keyword, setup up some ~display-buffer-alist~ records. #+begin_src emacs-lisp (use-package window @@ -954,7 +954,7 @@ Setup global mode after evil mode has been loaded ** Mode line A mode line in an editor can provide a LOT of information, or very little. I customised the Emacs modeline to give me a bit of info, -=telephone-line= to give me a lot. +~telephone-line~ to give me a lot. *** Emacs Mode-line Check out [[*Telephone-line][this package]] for my current modeline. @@ -1076,7 +1076,7 @@ with colouring and a ton of presentations to choose from. #+end_src ** Olivetti Olivetti provides a focus mode for Emacs, which makes it look a bit -nicer with fringes. I also define =+olivetti-mode= which will +nicer with fringes. I also define ~+olivetti-mode~ which will remember and clear up any window configurations on the frame, then when turned off will reinsert them - provides a nice way to quickly focus on a buffer. @@ -1173,8 +1173,8 @@ which is really useful. (counsel-projectile-mode +1)) #+end_src ** Avy -Setup avy with leader. As I use =avy-goto-char-timer= a lot, use the -=C-s= bind which replaces isearch. Switch isearch to M-s in case I +Setup avy with leader. As I use ~avy-goto-char-timer~ a lot, use the +~C-s~ bind which replaces isearch. Switch isearch to M-s in case I need to use it. #+begin_src emacs-lisp (use-package avy @@ -1204,7 +1204,7 @@ window can provide some nicer chords for higher management of windows #+end_src ** Helpful Basic setup that replaces commands and configures -=display-buffer-alist= for helpful. +~display-buffer-alist~ for helpful. #+begin_src emacs-lisp (use-package helpful :after ivy @@ -1252,18 +1252,18 @@ the ability to search a given file but also to search multiple files within a directory (which is usually only done by composing the program find with grep to search multiple files). It is incredibly fast by virtue of its regex optimisations and the use of ignore files -such as =.gitignore= to filter files when searching. +such as ~.gitignore~ to filter files when searching. -Grep has default Emacs utilities that use a =compilation= style buffer -to search a variety of differing data sets. =grep= searches files, -=rgrep= searches in a directory using the =find= binary and =zgrep= +Grep has default Emacs utilities that use a ~compilation~ style buffer +to search a variety of differing data sets. ~grep~ searches files, +~rgrep~ searches in a directory using the ~find~ binary and ~zgrep~ searches archives. This is a great solution for most computer environments as basically all of them will have grep and find -installed. Even when you =ssh= into a remote machine, they're likely +installed. Even when you ~ssh~ into a remote machine, they're likely to have these tools. The ripgrep package provides utilities to ripgrep projects and files -for strings via the rg binary. Though [[*Ivy][ivy]] comes with =counsel-rg= +for strings via the rg binary. Though [[*Ivy][ivy]] comes with ~counsel-rg~ using it makes me dependent on the ivy framework, and this configuration is intentionally built to be modular and switchable. Of course, this requires installing the rg binary which is available in @@ -1515,7 +1515,7 @@ Uses fd for finding file results in a directory: ~find-dired~ -> Xwidget is a package (must be compiled at source) which allows for the insertion of arbitrary xwidgets into Emacs through buffers. One of its premier uses is in navigating the web which it provides through the -function =xwidget-webkit-browse-url=. This renders a fully functional +function ~xwidget-webkit-browse-url~. This renders a fully functional web browser within Emacs. Though I am not to keen on using Emacs to browse the web /via/ xwidget @@ -1551,14 +1551,14 @@ results of work very quickly without switching windows or workspaces. "G" #'xwidget-webkit-scroll-bottom)) #+end_src *** Xwidget Extensions -Define a function =+xwidget/render-file= that reads a file name and +Define a function ~+xwidget/render-file~ that reads a file name and presents it in an xwidget. If the current file is an HTML file, ask -if user wants to open current file. Bind it to =aU= in the leader. +if user wants to open current file. Bind it to ~aU~ in the leader. -Also define a function =+xwidget/search-query= that first asks the +Also define a function ~+xwidget/search-query~ that first asks the user what search engine they want to use ([[https://duckduckgo.com][Duck Duck Go]] and [[https://devdocs.io][DevDocs]] currently) then asks for a query, which it parses then presents in an -xwidget window. Bind to =as= in the leader. +xwidget window. Bind to ~as~ in the leader. #+begin_src emacs-lisp (use-package xwidget :straight nil @@ -1604,18 +1604,16 @@ computing environment' moniker that Emacs gets. It may be argued that Emacs integrates within itself many of the functionalities that one would use within a shell or terminal. Stuff like compilation, file management, large scale text manipulation could -be done through Emacs' own tools (=compile=, =dired= and =occur= come +be done through Emacs' own tools (~compile~, ~dired~ and ~occur~ come to mind). However, I'd argue that eshell's greatest ability comes from it's separation (or perhaps better phrased, *integration*) of two 'parsers': the Lisp parser and the Shell parser. With these parsers you can mix and match at will for use in the shell, which grants greater power than many shells I know of. -*** Eshell Core -Setup a function that /toggles/ the eshell window rather than -just opening it via =+dx/toggle-buffer=. -Along with that setup the prompt so it looks a bit nicer and add -pretty symbols to eshell. +Setup a function that /toggles/ the eshell window rather than just +opening it via ~+dx/toggle-buffer~. Along with that setup the prompt +so it looks a bit nicer and add pretty symbols to eshell. #+begin_src emacs-lisp (use-package eshell :commands +shell/toggle-shell @@ -1806,7 +1804,7 @@ Core proced config, just a few bindings and evil collection setup. (evil-collection-proced-setup))) #+end_src -Along with that I setup the package =proced-narrow= which allows +Along with that I setup the package ~proced-narrow~ which allows further filtering of the process list. #+begin_src emacs-lisp (use-package proced-narrow @@ -1850,7 +1848,7 @@ algebraic notation mode). (evil-collection-calc-setup))) #+end_src *** Calctex -=calc-mode= also has a 3rd party package called =calctex=. It renders +~calc-mode~ also has a 3rd party package called ~calctex~. It renders mathematical expressions within calc as if they were rendered in TeX. You can also copy the expressions in their TeX forms, which is pretty useful when writing a paper. I've set a very specific lock on this @@ -2090,7 +2088,7 @@ highlighting. ("WAIT" . "#00CC00")))) #+end_src ** Hide-show mode -Turn on =hs-minor-mode= for all prog-mode. +Turn on ~hs-minor-mode~ for all prog-mode. #+begin_src emacs-lisp (use-package hideshow :straight nil @@ -2106,9 +2104,9 @@ For example if I were editing an org document which I was eventually compiling into a PDF, my workflow would be much smoother with a PDF viewer within Emacs that I can open on another pane. *** PDF tools -=pdf-tools= provides the necessary functionality for viewing PDFs. +~pdf-tools~ provides the necessary functionality for viewing PDFs. There is no proper PDF viewing without this package. -=evil-collection= provides a setup for this mode, so use that. +~evil-collection~ provides a setup for this mode, so use that. #+begin_src emacs-lisp (use-package pdf-tools :straight t @@ -2141,7 +2139,7 @@ to standard grep (but for PDFs!). (setq sql-display-sqli-buffer-function nil)) #+end_src ** Ada -Check out [[file:elisp/ada-mode.el][ada-mode*]], my custom =ada-mode= that replaces the default one. +Check out [[file:elisp/ada-mode.el][ada-mode*]], my custom ~ada-mode~ that replaces the default one. This mode just colourises stuff, and uses eglot to do the important stuff. @@ -2627,7 +2625,7 @@ mouthful). It's quite a beautiful language and really learning it will change the way you think about programming. Here I configure the REPL for Haskell via the -=haskell-interactive-mode= as well. +~haskell-interactive-mode~ as well. #+begin_src emacs-lisp (use-package haskell-mode :hook @@ -2654,7 +2652,7 @@ Here I configure the REPL for Haskell via the haskell-interactive-bring)) #+end_src ** Python -Works well for python. If you have =pyls= it should be on your path, so +Works well for python. If you have ~pyls~ it should be on your path, so just run eglot if you need. But an LSP server is not necessary for a lot of my time in python. #+begin_src emacs-lisp |