Updated config changes
This commit is contained in:
parent
b1447b84b4
commit
146fca260f
@ -73,6 +73,22 @@ This function times the startup to tell you how long it took for the emacs confi
|
||||
(add-hook 'emacs-startup-hook #'efs/display-startup-time)
|
||||
#+end_src
|
||||
|
||||
** White Space
|
||||
|
||||
This configuration replaces tabs with a custom number of spaces.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq-default indent-tabs-mode nil) ; Use spaces instead of tabs.
|
||||
(setq-default tab-width 3) ; Set tabs to be 3 spaces in length.
|
||||
|
||||
; Alias tab width for various languages.
|
||||
(setq-default c-basic-offset tab-width)
|
||||
(setq-default cperl-indent-level tab-width)
|
||||
(setq-default lisp-body-indent tab-width)
|
||||
(setq-default lisp-indent-offset tab-width)
|
||||
(setq-default js-indent-level tab-width) ; For both JSON and Javascript modes.
|
||||
#+end_src
|
||||
|
||||
* Packages
|
||||
|
||||
Emacs and packages. Pretty much a requirement.
|
||||
@ -195,6 +211,8 @@ Use doom modeline to make the modeline look nicer.
|
||||
(display-time))
|
||||
#+end_src
|
||||
|
||||
In order to avoid missing icons, you should also install the package ~all-the-icons-install-fonts~ through the emacs command line.
|
||||
|
||||
** Doom Themes
|
||||
|
||||
Install doom themes for better themes.
|
||||
@ -320,6 +338,7 @@ Undo tree's use is self explanitory. While the built-in emacs undo system is fin
|
||||
:after evil
|
||||
:config
|
||||
(evil-set-undo-system 'undo-tree)
|
||||
(setq undo-tree-history-directory-alist '(("." . "~/.emacs.d/undo")))
|
||||
(global-undo-tree-mode 1))
|
||||
#+end_src
|
||||
|
||||
@ -538,7 +557,9 @@ Below I am installing the actual package and adding some basic configuration.
|
||||
**** Lsp-UI
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package lsp-ui :after lsp-mode :commands lsp-ui-mode)
|
||||
(use-package lsp-ui
|
||||
:hook (lsp-mode . lsp-ui-mode)
|
||||
:config (setq lsp-ui-sideline-show-diagnostics t))
|
||||
#+end_src
|
||||
|
||||
**** Lsp-Ivy
|
||||
@ -561,6 +582,13 @@ Company is a package that automatically finds completions instead of making the
|
||||
("<tab>" . company-indent-or-complete-common)))
|
||||
#+end_src
|
||||
|
||||
** Flycheck
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package flycheck
|
||||
:init (global-flycheck-mode))
|
||||
#+end_src
|
||||
|
||||
** Language Servers
|
||||
|
||||
This will include any language server packages and configuration.
|
||||
@ -617,6 +645,20 @@ Install ~ccls~ with homebrew using the following command.
|
||||
sudo apt install ccls
|
||||
#+end_src
|
||||
|
||||
*** Golang
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package go-mode
|
||||
:hook (go-mode . lsp-deferred))
|
||||
#+end_src
|
||||
|
||||
*** JSON
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package json-mode
|
||||
:hook (json-mode . lsp-deferred))
|
||||
#+end_src
|
||||
|
||||
* Terminal
|
||||
|
||||
Emacs also has the functionality to run a terminal environment. While many other terminals will try to have similar capabilities with keybindings, nothing matches just integrating your terminal in emacs.
|
||||
|
@ -26,6 +26,7 @@ alert = #A54242
|
||||
disabled = #707880
|
||||
|
||||
[bar/example]
|
||||
monitor = ${env:MONITOR}
|
||||
width = 100%
|
||||
height = 24pt
|
||||
radius = 6
|
||||
@ -51,7 +52,7 @@ separator-foreground = ${colors.disabled}
|
||||
font-0 = monospace;2
|
||||
|
||||
modules-left = xworkspaces xwindow
|
||||
modules-right = filesystem brightness pulseaudio memory cpu battery wlan eth date
|
||||
modules-right = filesystem brightness pulseaudio memory cpu battery network date
|
||||
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
@ -86,7 +87,7 @@ label-empty-padding = 1
|
||||
|
||||
[module/xwindow]
|
||||
type = internal/xwindow
|
||||
label = %title:0:60:...%
|
||||
label = %title:0:30:...%
|
||||
|
||||
[module/filesystem]
|
||||
type = internal/fs
|
||||
@ -113,7 +114,7 @@ label-muted-foreground = ${colors.disabled}
|
||||
|
||||
[module/brightness]
|
||||
type = internal/backlight
|
||||
card = amdgpu_bl0
|
||||
card = intel_backlight
|
||||
|
||||
format-prefix = "BRI "
|
||||
format-prefix-foreground = ${colors.primary}
|
||||
@ -136,14 +137,15 @@ format-prefix-foreground = ${colors.primary}
|
||||
format = <label> <ramp-coreload>
|
||||
label = %percentage%% -
|
||||
|
||||
ramp-coreload-0 = ▁
|
||||
ramp-coreload-1 = ▂
|
||||
ramp-coreload-2 = ▃
|
||||
ramp-coreload-3 = ▄
|
||||
ramp-coreload-4 = ▅
|
||||
ramp-coreload-5 = ▆
|
||||
ramp-coreload-6 = ▇
|
||||
ramp-coreload-7 = █
|
||||
ramp-coreload-0 = " "
|
||||
ramp-coreload-1 = ▁
|
||||
ramp-coreload-2 = ▂
|
||||
ramp-coreload-3 = ▃
|
||||
ramp-coreload-4 = ▄
|
||||
ramp-coreload-5 = ▅
|
||||
ramp-coreload-6 = ▆
|
||||
ramp-coreload-7 = ▇
|
||||
ramp-coreload-8 = █
|
||||
ramp-coreload-spacing = 0
|
||||
|
||||
[module/battery]
|
||||
@ -165,23 +167,16 @@ format-charging-prefix-foreground = ${colors.primary}
|
||||
format-discharging-prefix-foreground = ${colors.primary}
|
||||
|
||||
|
||||
[network-base]
|
||||
[module/network]
|
||||
type = internal/network
|
||||
interface-type = wireless
|
||||
interval = 5
|
||||
|
||||
format-connected = <label-connected>
|
||||
format-disconnected = <label-disconnected>
|
||||
label-disconnected = %{F#0000FF}%ifname%%{F#707880} disconnected
|
||||
|
||||
[module/wlan]
|
||||
inherit = network-base
|
||||
interface-type = wireless
|
||||
label-connected = %{F#0000FF}%ifname%%{F-} %essid% %local_ip%
|
||||
|
||||
[module/eth]
|
||||
inherit = network-base
|
||||
interface-type = wired
|
||||
label-connected = %{F#0000FF}%ifname%%{F-} %local_ip%
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 1
|
||||
|
@ -1,3 +1,5 @@
|
||||
{
|
||||
"suggest.noselect": true,
|
||||
"suggest.enablePreselect": false,
|
||||
"diagnostic.checkCurrentLine": true
|
||||
}
|
||||
|
15
vim/init.vim
15
vim/init.vim
@ -11,7 +11,7 @@ set nohlsearch
|
||||
set hidden
|
||||
set incsearch
|
||||
set scrolloff=8
|
||||
set colorcolumn=80
|
||||
set colorcolumn=100
|
||||
set signcolumn=yes
|
||||
|
||||
" Remove arrow keys to train my fingers
|
||||
@ -45,7 +45,7 @@ colorscheme gruvbox
|
||||
set background=dark
|
||||
hi Normal guibg=NONE ctermbg=NONE
|
||||
|
||||
" Yara syntax highlighting
|
||||
" Setup yara syntax highlighting
|
||||
autocmd BufNewFile,BufRead *.yar,*.yara setlocal filetype=yara
|
||||
|
||||
" FZF key bindings
|
||||
@ -54,12 +54,15 @@ nnoremap <leader>fg <cmd>Rg<cr>
|
||||
nnoremap <leader>fb <cmd>Buffers<cr>
|
||||
|
||||
" use <tab> for trigger completion and navigate to the next complete item
|
||||
function! s:check_back_space() abort
|
||||
function! CheckBackspace() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~ '\s'
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
|
||||
inoremap <silent><expr> <Tab>
|
||||
\ pumvisible() ? "\<C-n>" :
|
||||
\ <SID>check_back_space() ? "\<Tab>" :
|
||||
\ coc#pum#visible() ? coc#pum#next(1) :
|
||||
\ CheckBackspace() ? "\<Tab>" :
|
||||
\ coc#refresh()
|
||||
|
||||
inoremap <expr> <Tab> coc#pum#visible() ? coc#pum#next(1) : "\<Tab>"
|
||||
inoremap <expr> <S-Tab> coc#pum#visible() ? coc#pum#prev(1) : "\<S-Tab>"
|
||||
|
@ -210,18 +210,24 @@ if [ -f "/usr/share/doc/fzf/examples/completion.zsh" ]; then
|
||||
source /usr/share/doc/fzf/examples/completion.zsh
|
||||
elif [ -f "/usr/share/fzf/completion.zsh" ]; then
|
||||
source /usr/share/fzf/completion.zsh
|
||||
else
|
||||
echo "completion.zsh not installed"
|
||||
fi
|
||||
|
||||
if [ -f "/usr/share/doc/fzf/examples/key-bindings.zsh" ]; then
|
||||
source /usr/share/doc/fzf/examples/key-bindings.zsh
|
||||
elif [ -f "/usr/share/fzf/key-bindings.zsh" ]; then
|
||||
source /usr/share/fzf/key-bindings.zsh
|
||||
else
|
||||
echo "key-bidings.zsh not installed"
|
||||
fi
|
||||
|
||||
if [ -f "/usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh" ]; then
|
||||
source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
elif [ -f "/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" ]; then
|
||||
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
else
|
||||
echo "zsh-autosuggestions.zsh not installed"
|
||||
fi
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user