Initial commit from korat
This commit is contained in:
7
.config/fish/conf.d/omf.fish
Normal file
7
.config/fish/conf.d/omf.fish
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# Path to Oh My Fish install.
|
||||||
|
set -q XDG_DATA_HOME
|
||||||
|
and set -gx OMF_PATH "$XDG_DATA_HOME/omf"
|
||||||
|
or set -gx OMF_PATH "$HOME/.local/share/omf"
|
||||||
|
|
||||||
|
# Load Oh My Fish configuration.
|
||||||
|
source $OMF_PATH/init.fish
|
||||||
63
.config/fish/config.fish
Normal file
63
.config/fish/config.fish
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
# -*- mode: shell-scrip -*-
|
||||||
|
|
||||||
|
set fish_greeting ""
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# exa
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
if type -q exa
|
||||||
|
alias ls="exa --git -g"
|
||||||
|
set -gx EXA_COLORS "da=36:uu=33:gu=33"
|
||||||
|
end
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Emacs
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
set -gx EDITOR "emacs -nw"
|
||||||
|
alias emacs="emacs -nw"
|
||||||
|
alias gemacs="emacs"
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Deb maintainer stuff
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
set -gx DEBFULLNAME "Alexandre Tuleu"
|
||||||
|
set -gx DEBEMAIL "alexandre.tuleu.2005@polytechnique.org"
|
||||||
|
set -gx GPGKEY "5915F6ED256016C6A44E7C907F8AA0EB0F59FF97"
|
||||||
|
set -gx DEBSIGN_KEYID $GPGKEY
|
||||||
|
set -gx DEB_BUILD_OPTIONS "parallel=15"
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Go Lang
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
if test -x /usr/local/go/bin/go
|
||||||
|
set -gx GOROOT /usr/local/go
|
||||||
|
set -gx GOPATH $HOME/devel/go
|
||||||
|
set PATH $PATH $GOROOT/bin $GOPATH/bin
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
export MINICOM="-c on"
|
||||||
|
|
||||||
|
# >>> conda initialize >>>
|
||||||
|
# !! Contents within this block are managed by 'conda init' !!
|
||||||
|
eval /home/atuleu/miniconda3/bin/conda "shell.fish" "hook" $argv | source
|
||||||
|
# <<< conda initialize <<<
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# direnv
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
direnv hook fish | source
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Starship
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
starship init fish | source
|
||||||
32
.config/fish/fish_variables
Normal file
32
.config/fish/fish_variables
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# This file contains fish universal variable definitions.
|
||||||
|
# VERSION: 3.0
|
||||||
|
SETUVAR __fish_initialized:3100
|
||||||
|
SETUVAR fish_color_autosuggestion:969896
|
||||||
|
SETUVAR fish_color_cancel:\x2dr
|
||||||
|
SETUVAR fish_color_command:c397d8
|
||||||
|
SETUVAR fish_color_comment:e7c547
|
||||||
|
SETUVAR fish_color_cwd:green
|
||||||
|
SETUVAR fish_color_cwd_root:red
|
||||||
|
SETUVAR fish_color_end:c397d8
|
||||||
|
SETUVAR fish_color_error:d54e53
|
||||||
|
SETUVAR fish_color_escape:00a6b2
|
||||||
|
SETUVAR fish_color_history_current:\x2d\x2dbold
|
||||||
|
SETUVAR fish_color_host:normal
|
||||||
|
SETUVAR fish_color_host_remote:yellow
|
||||||
|
SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
|
||||||
|
SETUVAR fish_color_normal:normal
|
||||||
|
SETUVAR fish_color_operator:00a6b2
|
||||||
|
SETUVAR fish_color_param:7aa6da
|
||||||
|
SETUVAR fish_color_quote:b9ca4a
|
||||||
|
SETUVAR fish_color_redirection:70c0b1
|
||||||
|
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
|
||||||
|
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
|
||||||
|
SETUVAR fish_color_status:red
|
||||||
|
SETUVAR fish_color_user:brgreen
|
||||||
|
SETUVAR fish_color_valid_path:\x2d\x2dunderline
|
||||||
|
SETUVAR fish_greeting:
|
||||||
|
SETUVAR fish_key_bindings:fish_default_key_bindings
|
||||||
|
SETUVAR fish_pager_color_completion:normal
|
||||||
|
SETUVAR fish_pager_color_description:B3A06D\x1eyellow
|
||||||
|
SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
||||||
|
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
||||||
1
.config/fish/functions/fish_prompt.fish
Symbolic link
1
.config/fish/functions/fish_prompt.fish
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
/home/atuleu/.local/share/omf/themes/boxfish/fish_prompt.fish
|
||||||
2
.config/omf/bundle
Normal file
2
.config/omf/bundle
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
theme bobthefish
|
||||||
|
theme default
|
||||||
1
.config/omf/channel
Normal file
1
.config/omf/channel
Normal file
@@ -0,0 +1 @@
|
|||||||
|
stable
|
||||||
1
.config/omf/theme
Normal file
1
.config/omf/theme
Normal file
@@ -0,0 +1 @@
|
|||||||
|
default
|
||||||
70
.config/starship.toml
Normal file
70
.config/starship.toml
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
#format = """$character"""
|
||||||
|
#right_format = """$all"""
|
||||||
|
|
||||||
|
add_newline = false
|
||||||
|
|
||||||
|
[cmake]
|
||||||
|
disabled = true
|
||||||
|
|
||||||
|
|
||||||
|
[character] # The name of the module we are configuring is "character"
|
||||||
|
success_symbol = "[◤](#444444)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
|
||||||
|
error_symbol = "[◤](red)" # The "success_symbol" segment is being set to "➜" with the color "bold green"
|
||||||
|
|
||||||
|
[username]
|
||||||
|
style_user="bold green"
|
||||||
|
format="[$user]($style)@"
|
||||||
|
show_always = true
|
||||||
|
|
||||||
|
[hostname]
|
||||||
|
ssh_only = false
|
||||||
|
style="cyan"
|
||||||
|
format = "[$hostname]($style) in "
|
||||||
|
|
||||||
|
[directory]
|
||||||
|
style = "bold yellow"
|
||||||
|
truncation_length = 8
|
||||||
|
#truncate_to_repo = false
|
||||||
|
|
||||||
|
[conda]
|
||||||
|
symbol = "⛎ "
|
||||||
|
style="green"
|
||||||
|
format = "[$symbol$environment]($style) "
|
||||||
|
|
||||||
|
[python]
|
||||||
|
format="[$symbol$version]($style) "
|
||||||
|
|
||||||
|
[nodejs]
|
||||||
|
format="[$symbol$version]($style) "
|
||||||
|
|
||||||
|
[golang]
|
||||||
|
format="[$symbol$version]($style) "
|
||||||
|
|
||||||
|
[status]
|
||||||
|
disabled = false
|
||||||
|
map_symbol = true
|
||||||
|
style="bg:#444444 red"
|
||||||
|
format = "[◤](#444444 bg:red)[$symbol $status ](bg:red)"
|
||||||
|
|
||||||
|
[time]
|
||||||
|
disabled = false
|
||||||
|
style="bg:#444444 bright-white"
|
||||||
|
format="[◢](#444444)[$time ]($style)"
|
||||||
|
time_format = '%a %b %d %R'
|
||||||
|
|
||||||
|
[git_branch]
|
||||||
|
|
||||||
|
[git_commit]
|
||||||
|
tag_disabled=false
|
||||||
|
|
||||||
|
[git_state]
|
||||||
|
|
||||||
|
[git_metrics]
|
||||||
|
added_style="bold green"
|
||||||
|
deleted_style="bold red"
|
||||||
|
format='([+$added]($added_style) )([-$deleted]($deleted_style) )'
|
||||||
|
disabled=false
|
||||||
|
|
||||||
|
[git_status]
|
||||||
|
style="bold red"
|
||||||
|
format='([\[$all_status$ahead_behind\]]($style) )'
|
||||||
471
.emacs
Normal file
471
.emacs
Normal file
@@ -0,0 +1,471 @@
|
|||||||
|
|
||||||
|
(global-set-key (kbd "M-p") 'backward-paragraph)
|
||||||
|
(global-set-key (kbd "M-n") 'forward-paragraph)
|
||||||
|
|
||||||
|
|
||||||
|
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
|
||||||
|
(custom-set-variables
|
||||||
|
;; custom-set-variables was added by Custom.
|
||||||
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
|
;; Your init file should contain only one such instance.
|
||||||
|
;; If there is more than one, they won't work right.
|
||||||
|
'(ansi-color-faces-vector
|
||||||
|
[default bold shadow italic underline bold bold-italic bold])
|
||||||
|
'(ansi-color-names-vector
|
||||||
|
(vector "#eaeaea" "#d54e53" "DarkOliveGreen3" "#e7c547" "DeepSkyBlue1" "#c397d8" "#70c0b1" "#181a26"))
|
||||||
|
'(c-default-style
|
||||||
|
(quote
|
||||||
|
((c++-mode . "tuleu-c++")
|
||||||
|
(java-mode . "java")
|
||||||
|
(awk-mode . "awk")
|
||||||
|
(other . "gnu"))))
|
||||||
|
'(company-idle-delay 20.0)
|
||||||
|
'(company-quickhelp-color-background "#4F4F4F")
|
||||||
|
'(company-quickhelp-color-foreground "#DCDCCC")
|
||||||
|
'(compilation-scroll-output (quote first-error))
|
||||||
|
'(custom-safe-themes
|
||||||
|
(quote
|
||||||
|
("842bf45f64e12795d4b8dcc9a30c1b5396b7794b12cedd81fd4531193b864872" "2540689fd0bc5d74c4682764ff6c94057ba8061a98be5dd21116bf7bf301acfb" "cdb4ffdecc682978da78700a461cdc77456c3a6df1c1803ae2dd55c59fa703e3" "332fcf3c7208aca9fab65d54203f78a242482e7fd65f5725a2482c20b1730732" "c7f10959cb1bc7a36ee355c765a1768d48929ec55dde137da51077ac7f899521" "c9ddf33b383e74dac7690255dd2c3dfa1961a8e8a1d20e401c6572febef61045" "bf798e9e8ff00d4bf2512597f36e5a135ce48e477ce88a0764cfb5d8104e8163" "36ca8f60565af20ef4f30783aa16a26d96c02df7b4e54e9900a5138fb33808da" "2a7beed4f24b15f77160118320123d699282cbf196e0089f113245d4b729ba5d" default)))
|
||||||
|
'(display-line-numbers-type t)
|
||||||
|
'(fci-rule-color "#14151E")
|
||||||
|
'(global-auto-revert-mode t)
|
||||||
|
'(global-display-line-numbers-mode t)
|
||||||
|
'(gofmt-command "goimports")
|
||||||
|
'(inhibit-startup-screen t)
|
||||||
|
'(linum-format "%03d ")
|
||||||
|
'(magit-revert-buffers (quote silent) t)
|
||||||
|
'(markdown-css-paths
|
||||||
|
(quote
|
||||||
|
("file:///home/tuleu/.config/markdown/css/retro.css")))
|
||||||
|
'(nrepl-message-colors
|
||||||
|
(quote
|
||||||
|
("#CC9393" "#DFAF8F" "#F0DFAF" "#7F9F7F" "#BFEBBF" "#93E0E3" "#94BFF3" "#DC8CC3")))
|
||||||
|
'(org-agenda-files (quote ("~/org/1.TODO.org")))
|
||||||
|
'(package-archives
|
||||||
|
(quote
|
||||||
|
(("gnu" . "https://elpa.gnu.org/packages/")
|
||||||
|
("melpa" . "https://melpa.org/packages/"))))
|
||||||
|
'(package-selected-packages
|
||||||
|
(quote
|
||||||
|
(projectile langtool flycheck elpy lsp-mode smart-tabs-mode opencl-mode company-go yasnippet-snippets yasnippet company-lsp ess ample-zen-theme auctex-latexmk dockerfile-mode dpkg-dev-el cmake-ide debian-changelog-mode debian-el nginx-mode sudo-edit typescript-mode yaml-mode string-inflection protobuf-mode markdown-mode auctex flymake-go go-mode srefactor company-glsl glsl-mode company company-cmake company-irony company-irony-c-headers irony magit lua-mode)))
|
||||||
|
'(pdf-view-midnight-colors (quote ("#DCDCCC" . "#383838")))
|
||||||
|
'(safe-local-variable-values
|
||||||
|
(quote
|
||||||
|
((TeX-master . "../../../main_fr.tex")
|
||||||
|
(TeX-master . "../../../main_fr")
|
||||||
|
(TeX-master . "../../../main_en")
|
||||||
|
(TeX-master . t)
|
||||||
|
(cmake-ide-build-dir . "/home/tuleu/devel/formicidae-tracker/fort-studio/build")
|
||||||
|
(cmake-ide-project-dir . "/home/tuleu/devel/formicidae-tracker/fort-studio")
|
||||||
|
(eval progn
|
||||||
|
(let
|
||||||
|
((project-root-directory
|
||||||
|
(when buffer-file-name
|
||||||
|
(locate-dominating-file buffer-file-name ".dir-locals.el")))))
|
||||||
|
(when project-root-directory
|
||||||
|
(setq compile-command
|
||||||
|
(concat "make -j 7 -C " project-root-directory))))
|
||||||
|
(irony-additional-clang-options concat
|
||||||
|
(locate-dominating-file buffer-file-name ".dir-locals.el")
|
||||||
|
"/src")
|
||||||
|
(TeX-parse-self . t)
|
||||||
|
(compile-command concat "make -C "
|
||||||
|
(locate-dominating-file buffer-file-name ".dir-locals.el")
|
||||||
|
"/build all check doc")
|
||||||
|
(compile-command concat "make -C "
|
||||||
|
(locate-dominating-file buffer-file-name ".dir-locals.el")
|
||||||
|
"/build -j 7 all")
|
||||||
|
(compile-command concat "make -C "
|
||||||
|
(locate-dominating-file buffer-file-name ".dir-locals.el")
|
||||||
|
"/build")
|
||||||
|
(compile-command concat "make -C "
|
||||||
|
(locate-dominating-file buffer-file-name ".dir-locals.el")
|
||||||
|
"/build-trusty")
|
||||||
|
(compile-command concat "make -C "
|
||||||
|
(locate-dominating-file buffer-file-name ".dir-locals.el")
|
||||||
|
"/build -j 7")
|
||||||
|
(compile-command concat "make -C "
|
||||||
|
(locate-dominating-file buffer-file-name ".dir-locals.el")
|
||||||
|
"/build -j 7 check")
|
||||||
|
(compile-command concat "make -C "
|
||||||
|
(locate-dominating-file buffer-file-name ".dir-locals.el")
|
||||||
|
"/build -j 7 all check")
|
||||||
|
(compile-command concat "make -C "
|
||||||
|
(locate-dominating-file buffer-file-name ".dir-locals.el")))))
|
||||||
|
'(srefactor--getter-prefix "Get")
|
||||||
|
'(srefactor--getter-setter-capitalize-p t)
|
||||||
|
'(srefactor--setter-prefix "Set")
|
||||||
|
'(tab-width 4)
|
||||||
|
'(vc-annotate-background nil)
|
||||||
|
'(vc-annotate-color-map
|
||||||
|
(quote
|
||||||
|
((20 . "#d54e53")
|
||||||
|
(40 . "goldenrod")
|
||||||
|
(60 . "#e7c547")
|
||||||
|
(80 . "DarkOliveGreen3")
|
||||||
|
(100 . "#70c0b1")
|
||||||
|
(120 . "DeepSkyBlue1")
|
||||||
|
(140 . "#c397d8")
|
||||||
|
(160 . "#d54e53")
|
||||||
|
(180 . "goldenrod")
|
||||||
|
(200 . "#e7c547")
|
||||||
|
(220 . "DarkOliveGreen3")
|
||||||
|
(240 . "#70c0b1")
|
||||||
|
(260 . "DeepSkyBlue1")
|
||||||
|
(280 . "#c397d8")
|
||||||
|
(300 . "#d54e53")
|
||||||
|
(320 . "goldenrod")
|
||||||
|
(340 . "#e7c547")
|
||||||
|
(360 . "DarkOliveGreen3"))))
|
||||||
|
'(vc-annotate-very-old-color nil))
|
||||||
|
(custom-set-faces
|
||||||
|
;; custom-set-faces was added by Custom.
|
||||||
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
|
;; Your init file should contain only one such instance.
|
||||||
|
;; If there is more than one, they won't work right.
|
||||||
|
'(flymake-errline ((t (:foreground "brightred" :underline t))) t)
|
||||||
|
'(flymake-infoline ((t (:foreground "color-49" :underline "color-49"))))
|
||||||
|
'(flymake-warnline ((t (:foreground "color-208" :underline t))) t)
|
||||||
|
'(font-lock-function-name-face ((t (:foreground "burlywood4"))))
|
||||||
|
'(font-lock-string-face ((t (:foreground "brightmagenta"))))
|
||||||
|
'(line-number ((t (:inherit (shadow default) :foreground "gray25"))))
|
||||||
|
'(line-number-current-line ((t (:inherit line-number :foreground "gray40"))))
|
||||||
|
'(whitespace-hspace ((t (:foreground "lightgray"))))
|
||||||
|
'(whitespace-indentation ((t (:foreground "color-52"))))
|
||||||
|
'(whitespace-newline ((t (:foreground "color-237" :weight normal))))
|
||||||
|
'(whitespace-space ((t (:foreground "color-237"))))
|
||||||
|
'(whitespace-space-after-tab ((t (:foreground "firebrick"))))
|
||||||
|
'(whitespace-tab ((t (:foreground "color-237")))))
|
||||||
|
|
||||||
|
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.m$" . octave-mode ))
|
||||||
|
(toggle-scroll-bar -1)
|
||||||
|
(menu-bar-mode -1)
|
||||||
|
(tool-bar-mode -1)
|
||||||
|
(add-to-list 'default-frame-alist '(fullscreen . maximized))
|
||||||
|
(set-face-attribute 'default nil :height 70)
|
||||||
|
;;(setq package-enable-at-startup nil)
|
||||||
|
;;(package-initialize)
|
||||||
|
;; (require 'auto-complete)
|
||||||
|
;; (require 'auto-complete-config)
|
||||||
|
|
||||||
|
;; (if (getenv "GOPATH")
|
||||||
|
;; (progn
|
||||||
|
;; (require 'go-autocomplete)
|
||||||
|
;; (add-to-list 'load-path (concat (getenv "GOPATH") "/src/github.com/golang/lint/misc/emacs"))
|
||||||
|
;; (require 'golint)
|
||||||
|
;; )
|
||||||
|
;; ()
|
||||||
|
;; )
|
||||||
|
|
||||||
|
;; (ac-config-default)
|
||||||
|
|
||||||
|
;; (define-key ac-mode-map (kbd "M-TAB") 'auto-complete)
|
||||||
|
;; (setq ac-auto-start nil)
|
||||||
|
|
||||||
|
|
||||||
|
(global-set-key (kbd "<f9>") 'compile)
|
||||||
|
|
||||||
|
;;(require 'codyn-mode)
|
||||||
|
|
||||||
|
|
||||||
|
(defun c-c++-header ()
|
||||||
|
"sets either c-mode or c++-mode, whichever is appropriate for
|
||||||
|
header"
|
||||||
|
(interactive)
|
||||||
|
(let ((c-file (concat (substring (buffer-file-name) 0 -1) "c")))
|
||||||
|
(if (file-exists-p c-file)
|
||||||
|
(c-mode)
|
||||||
|
(c++-mode))))
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.h\\'" . c-c++-header))
|
||||||
|
|
||||||
|
|
||||||
|
(require 'iso-transl)
|
||||||
|
|
||||||
|
|
||||||
|
;; (require 'hideshow)
|
||||||
|
;; (require 'sgml-mode)
|
||||||
|
;; (require 'nxml-mode)
|
||||||
|
;; (add-to-list 'hs-special-modes-alist
|
||||||
|
;; '(nxml-mode
|
||||||
|
;; "<!--\\|<[^/>]*[^/]>"
|
||||||
|
;; "-->\\|</[^/>]*[^/]>"
|
||||||
|
|
||||||
|
;; "<!--"
|
||||||
|
;; sgml-skip-tag-forward
|
||||||
|
;; nil))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;; (add-hook 'nxml-mode-hook 'hs-minor-mode)
|
||||||
|
|
||||||
|
;; ;; optional key bindings, easier than hs defaults
|
||||||
|
;; (define-key nxml-mode-map (kbd "C-c h") 'hs-toggle-hiding)
|
||||||
|
|
||||||
|
|
||||||
|
(defconst tuleu-cc-style
|
||||||
|
'("gnu"
|
||||||
|
(c-offsets-alist . ((innamespace . [0])))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(c-add-style "tuleu-c++" tuleu-cc-style)
|
||||||
|
|
||||||
|
(global-set-key (kbd "C-x g") 'magit-status)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(defun my-company-mode-hook ()
|
||||||
|
(global-set-key (kbd "C-M-i") 'company-complete))
|
||||||
|
(add-hook 'company-mode-hook 'my-company-mode-hook)
|
||||||
|
|
||||||
|
|
||||||
|
;(add-hook 'c++-mode-hook 'irony-mode)
|
||||||
|
;(add-hook 'c-mode-hook 'irony-mode)
|
||||||
|
|
||||||
|
|
||||||
|
;(add-hook 'c++-mode-hook 'company-mode)
|
||||||
|
;(add-hook 'c-mode-hook 'company-mode)
|
||||||
|
(defun my-cmake-mode-hook ()
|
||||||
|
(company-mode)
|
||||||
|
)
|
||||||
|
|
||||||
|
(add-hook 'cmake-mode-hook 'my-cmake-mode-hook)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(defun my-c-common-hook ()
|
||||||
|
(global-set-key (kbd "C-c C-h") 'ff-find-other-file)
|
||||||
|
(require 'compile)
|
||||||
|
(add-to-list 'compilation-error-regexp-alist '("^[0-9]+: \\(.*\\):\\([0-9]+\\): Failure$" 1 2))
|
||||||
|
(global-set-key (kbd "C-x f") 'find-file-at-point)
|
||||||
|
(add-hook 'irony-mode-hook 'company-irony-setup-begin-commands)
|
||||||
|
(add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)
|
||||||
|
(require 'irony)
|
||||||
|
(require 'yasnippet)
|
||||||
|
(push 'glsl-mode irony-supported-major-modes)
|
||||||
|
(push 'protobuf-mode irony-supported-major-modes)
|
||||||
|
(push 'opencl-mode irony-supported-major-modes)
|
||||||
|
(eval-after-load 'company
|
||||||
|
'(add-to-list
|
||||||
|
'company-backends
|
||||||
|
'(company-irony-c-headers company-irony company-yasnippet)))
|
||||||
|
(require 'company)
|
||||||
|
(global-company-mode)
|
||||||
|
(irony-mode)
|
||||||
|
(define-key yas-minor-mode-map [(tab)] nil)
|
||||||
|
(define-key yas-minor-mode-map (kbd "TAB") nil)
|
||||||
|
(yas-minor-mode)
|
||||||
|
(require 'srefactor)
|
||||||
|
; (semantic-mode 1)
|
||||||
|
(define-key c-mode-map (kbd "M-RET") 'srefactor-refactor-at-point)
|
||||||
|
(define-key c++-mode-map (kbd "M-RET") 'srefactor-refactor-at-point)
|
||||||
|
; (semantic-mode)
|
||||||
|
; (load-file "/home/tuleu/devel/github.com/ffevotte/clang-tags/build/env.el")
|
||||||
|
(c-set-offset 'inextern-lang 0)
|
||||||
|
)
|
||||||
|
(add-hook 'c-mode-common-hook 'my-c-common-hook)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(defun my-LaTeX-hook ()
|
||||||
|
(message "LaTeX hook")
|
||||||
|
;; (require 'auctex-latexmk)
|
||||||
|
;; (auctex-latexmk-setup)
|
||||||
|
;; (setq auctex-latexmk-inherit-TeX-PDF-mode t)
|
||||||
|
(add-to-list 'TeX-command-list
|
||||||
|
'("latexmk" "latexmk -pdf -interaction=nonstopmode -shell-escape %s" TeX-run-TeX nil t
|
||||||
|
:help "Run latexmk on file"))
|
||||||
|
(setq TeX-command-default "latexmk")
|
||||||
|
; (setq fill-column 10000000)
|
||||||
|
; (visual-line-mode)
|
||||||
|
; (window-margin-mode)
|
||||||
|
; (setq window-margin-width 80)
|
||||||
|
(setq LaTeX-includegraphics-read-file 'LaTeX-includegraphics-read-file-relative)
|
||||||
|
(setq LaTeX-includegraphics-strip-extension-flag nil)
|
||||||
|
(add-to-list 'LaTeX-includegraphics-extensions '"tikz")
|
||||||
|
;; use Okular as default pdf viewer
|
||||||
|
(setq TeX-view-program-selection '((output-pdf "Okular PDF Viewer")))
|
||||||
|
(add-to-list 'TeX-expand-list '("%(dir)" (lambda nil (expand-file-name (TeX-master-directory)))))
|
||||||
|
(setq TeX-view-program-list
|
||||||
|
'(("Okular PDF Viewer" "okular --unique %o#src:%n%(dir)./%b")))
|
||||||
|
;; (setq auctex-latexmk-inherit-TeX-PDF-mode t)
|
||||||
|
;; launch server if not launched
|
||||||
|
(load "server")
|
||||||
|
(unless (server-running-p) (server-start))
|
||||||
|
)
|
||||||
|
(add-hook 'LaTeX-mode-hook 'my-LaTeX-hook)
|
||||||
|
|
||||||
|
(defun my-TeX-hook ()
|
||||||
|
(message "TeX hook")
|
||||||
|
(setq reftex-plug-into-AUCTeX t)
|
||||||
|
(global-set-key (kbd "C-x f") 'find-file-at-point)
|
||||||
|
(turn-on-reftex)
|
||||||
|
(setq TeX-parse-self t)
|
||||||
|
(setq TeX-auto-save t)
|
||||||
|
(TeX-PDF-mode)
|
||||||
|
(setq reftex-ref-macro-prompt nil)
|
||||||
|
(defun my-latex-insert-cite (&optional P)
|
||||||
|
""
|
||||||
|
(interactive "P")
|
||||||
|
(TeX-insert-macro "cite")
|
||||||
|
)
|
||||||
|
(define-key LaTeX-mode-map [remap reftex-citation] 'my-latex-insert-cite)
|
||||||
|
(add-hook 'before-save-hook 'delete-trailing-whitespace)
|
||||||
|
(setq-default TeX-master nil)
|
||||||
|
(defun my-latex-fill-paragraph (&optional P)
|
||||||
|
"When called with prefix argument call `fill-paragraph'.
|
||||||
|
Otherwise split the current paragraph into one sentence per line."
|
||||||
|
(interactive "P")
|
||||||
|
(if (not P)
|
||||||
|
(save-excursion
|
||||||
|
(let ((fill-column 12345678)) ;; relies on dynamic binding
|
||||||
|
(fill-paragraph) ;; this will not work correctly if the paragraph is
|
||||||
|
;; longer than 12345678 characters (in which case the
|
||||||
|
;; file must be at least 12MB long. This is unlikely.)
|
||||||
|
(let ((end (save-excursion
|
||||||
|
(forward-paragraph 1)
|
||||||
|
(backward-sentence)
|
||||||
|
(point-marker)))) ;; remember where to stop
|
||||||
|
(beginning-of-line)
|
||||||
|
(while (progn (forward-sentence)
|
||||||
|
(<= (point) (marker-position end)))
|
||||||
|
(just-one-space) ;; leaves only one space, point is after it
|
||||||
|
(delete-char -1) ;; delete the space
|
||||||
|
(insert " %");; insert a %
|
||||||
|
(newline) ;; and insert a newline
|
||||||
|
(LaTeX-indent-line) ;; I only use this in combination with late, so this makes sense
|
||||||
|
))))
|
||||||
|
;; otherwise do ordinary fill paragraph
|
||||||
|
(fill-paragraph P))
|
||||||
|
)
|
||||||
|
(define-key LaTeX-mode-map (kbd "M-q") 'my-latex-fill-paragraph)
|
||||||
|
)
|
||||||
|
(add-hook 'TeX-mode-hook 'my-TeX-hook)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(defun my-markdown-hook ()
|
||||||
|
(defun my-markdown-preview-buffer ()
|
||||||
|
(require 'shr)
|
||||||
|
(require 'eww)
|
||||||
|
(interactive)
|
||||||
|
(let* ((buf-this (buffer-name (current-buffer)))
|
||||||
|
(buf-html (get-buffer-create
|
||||||
|
(format "*my-md-html (%s)*" buf-this))))
|
||||||
|
(markdown-other-window (buffer-name buf-html))
|
||||||
|
(shr-render-buffer buf-html)
|
||||||
|
(eww-mode)
|
||||||
|
(kill-buffer buf-html))
|
||||||
|
)
|
||||||
|
(global-set-key (kbd "C-c C-c C-p") 'my-markdown-preview-buffer)
|
||||||
|
(setq markdown-command "remarkable")
|
||||||
|
)
|
||||||
|
(add-hook 'markdown-mode-hook 'my-markdown-hook)
|
||||||
|
(defun my-gfm-mode-hook ()
|
||||||
|
(setq markdown-command "remarkable")
|
||||||
|
)
|
||||||
|
(add-hook 'gfm-mode-hook 'my-gfm-mode-hook)
|
||||||
|
|
||||||
|
(defun my-python-mode-hook ()
|
||||||
|
(require 'elpy)
|
||||||
|
(require 'flycheck)
|
||||||
|
(elpy-enable)
|
||||||
|
(setq elpy-modules (delq 'elpy-module-flymake elpy-modules))
|
||||||
|
(add-hook 'elpy-mode-hook (lambda ()
|
||||||
|
(add-hook 'before-save-hook
|
||||||
|
'elpy-black-fix-code nil t)))
|
||||||
|
(elpy-mode)
|
||||||
|
)
|
||||||
|
(add-hook 'python-mode-hook 'my-python-mode-hook)
|
||||||
|
|
||||||
|
(defun my-after-init-hook ()
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.md\\'" . gfm-mode))
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.markdown\\'" . gfm-mode))
|
||||||
|
(require 'smart-tabs-mode)
|
||||||
|
(smart-tabs-add-language-support cmake cmake-mode-hook
|
||||||
|
(
|
||||||
|
(cmake-indent . cmake-tab-width)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(smart-tabs-add-language-support protobuf protobuf-mode-hook
|
||||||
|
(
|
||||||
|
(c-indent-line . c-basic-offset)
|
||||||
|
(c-indent-region . c-basic-offset)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(smart-tabs-add-language-support html html-mode-hook
|
||||||
|
(
|
||||||
|
(sgml-indent-line . sgml-basic-offset)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(smart-tabs-add-language-support glsl glsl-mode-hook
|
||||||
|
(
|
||||||
|
(c-indent-line . c-basic-offset)
|
||||||
|
(c-indent-region . c-basic-offset)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(smart-tabs-add-language-support opencl opencl-mode-hook
|
||||||
|
(
|
||||||
|
(c-indent-line . c-basic-offset)
|
||||||
|
(c-indent-region . c-basic-offset)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(smart-tabs-insinuate 'c 'javascript 'c++ 'cmake 'nxml 'protobuf 'html 'glsl)
|
||||||
|
;; do things after package initialization
|
||||||
|
(load-theme 'ample-zen t)
|
||||||
|
)
|
||||||
|
(add-hook 'after-init-hook 'my-after-init-hook)
|
||||||
|
|
||||||
|
|
||||||
|
(defun my-go-hook ()
|
||||||
|
(require 'company)
|
||||||
|
(require 'company-go)
|
||||||
|
;; (require 'flymake-go)
|
||||||
|
(company-mode)
|
||||||
|
(setq gofmt-command "goimports")
|
||||||
|
(add-hook 'before-save-hook 'gofmt-before-save)
|
||||||
|
(set (make-local-variable 'company-backends) '(company-go))
|
||||||
|
(flymake-mode)
|
||||||
|
(global-set-key (kbd "C-c C-h") 'godef-describe)
|
||||||
|
(global-set-key (kbd "C-c C-j") 'godef-jump)
|
||||||
|
(setq compile-command "go build && go test -coverprofile=cover.out && go tool cover -html cover.out -o /tmp/cover.html")
|
||||||
|
)
|
||||||
|
(add-hook 'go-mode-hook 'my-go-hook)
|
||||||
|
|
||||||
|
|
||||||
|
(defun my-html-hook ()
|
||||||
|
(add-hook 'before-save-hook 'delete-trailing-whitespace)
|
||||||
|
)
|
||||||
|
(add-hook 'html-mode-hook 'my-html-hook)
|
||||||
|
|
||||||
|
(add-hook 'before-save-hook 'delete-trailing-whitespace)
|
||||||
|
|
||||||
|
(defun my-protobuf-mode-hook ()
|
||||||
|
(defconst my-protobuf-style
|
||||||
|
'((c-basic-offset . 4)
|
||||||
|
(indent-tabs-mode . t)))
|
||||||
|
(c-add-style "my-style" my-protobuf-style t)
|
||||||
|
(smart-tabs-mode)
|
||||||
|
)
|
||||||
|
(add-hook 'protobuf-mode-hook 'my-protobuf-mode-hook)
|
||||||
|
|
||||||
|
(defun my-typescript-mode-hook ()
|
||||||
|
(setq create-lockfiles nil)
|
||||||
|
(add-to-list 'compilation-error-regexp-alist '("^Error: \\(.*?\\):\\([0-9]+\\):\\([0-9]+\\)" 1 2 3))
|
||||||
|
)
|
||||||
|
(add-hook 'typescript-mode-hook 'my-typescript-mode-hook)
|
||||||
|
|
||||||
|
(with-eval-after-load 'typescript-mode (add-hook 'typescript-mode-hook #'lsp))
|
||||||
|
|
||||||
|
(setq langtool-language-tool-server-jar "~/.languagetool/languagetool-server.jar")
|
||||||
|
(setq langtool-default-language "en-US")
|
||||||
|
|
||||||
|
(global-set-key (kbd "C-c l c") 'langtool-check)
|
||||||
|
(global-set-key (kbd "C-c l d") 'langtool-check-done)
|
||||||
|
(global-set-key (kbd "C-c l l") 'langtool-switch-default-language)
|
||||||
|
(global-set-key (kbd "C-c l s") 'langtool-show-message-at-point)
|
||||||
|
(global-set-key (kbd "C-c l b") 'langtool-correct-buffer)
|
||||||
8
.gitignore
vendored
Normal file
8
.gitignore
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
*
|
||||||
|
|
||||||
|
!.gitignore
|
||||||
|
!.config/fish/*
|
||||||
|
!.config/starship.toml
|
||||||
|
!.config/omf/*
|
||||||
|
!.emacs
|
||||||
|
!.config/git/*
|
||||||
Reference in New Issue
Block a user