Added C autocompletion
This commit is contained in:
parent
4c8bc64e56
commit
b05e98b391
2 changed files with 51 additions and 17 deletions
66
config.org
66
config.org
|
@ -3,7 +3,7 @@
|
||||||
#+OPTIONS: toc:nil
|
#+OPTIONS: toc:nil
|
||||||
|
|
||||||
* qorg's Emacs config
|
* qorg's Emacs config
|
||||||
|
|
||||||
This is my Emacs configuration. Hope you like it.
|
This is my Emacs configuration. Hope you like it.
|
||||||
|
|
||||||
** Installation
|
** Installation
|
||||||
|
@ -30,6 +30,13 @@
|
||||||
IBM Plex Mono font. Install it from your distribution packages.
|
IBM Plex Mono font. Install it from your distribution packages.
|
||||||
You can change it before opening Emacs with this configuration for
|
You can change it before opening Emacs with this configuration for
|
||||||
the first time.
|
the first time.
|
||||||
|
|
||||||
|
For irony-mode (C autocompletion) irony-sever must be
|
||||||
|
installed. You can install it with M-x irony-install-server or via
|
||||||
|
distribution's packages, in Debian case, apt install irony-server.
|
||||||
|
Using M-x irony-install-server requires cmake and a lot of
|
||||||
|
dependences I'm to lazy to install.
|
||||||
|
|
||||||
* melpa crap, and basic packages installation
|
* melpa crap, and basic packages installation
|
||||||
melpa, where you get the packages. This also installs use-package,
|
melpa, where you get the packages. This also installs use-package,
|
||||||
and other packages I use.
|
and other packages I use.
|
||||||
|
@ -53,7 +60,7 @@
|
||||||
** Generic packages
|
** Generic packages
|
||||||
Here I install some packages that don't need configuration.
|
Here I install some packages that don't need configuration.
|
||||||
Remember to run M-x all-the-icons-install-fonts after the first
|
Remember to run M-x all-the-icons-install-fonts after the first
|
||||||
init to install the fonts.
|
init to install the fonts.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
|
||||||
(use-package markdown-mode
|
(use-package markdown-mode
|
||||||
|
@ -125,7 +132,7 @@ Including indent-buffer, which should not be called automatically on save."
|
||||||
:init
|
:init
|
||||||
(add-hook 'sgml-mode-hook 'zencoding-mode))
|
(add-hook 'sgml-mode-hook 'zencoding-mode))
|
||||||
(setq-default dired-details-hidden-string "---- ")
|
(setq-default dired-details-hidden-string "---- ")
|
||||||
|
|
||||||
;; (icomplete-mode 1) Deprecated, used ido-mode instead
|
;; (icomplete-mode 1) Deprecated, used ido-mode instead
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
@ -135,7 +142,7 @@ Including indent-buffer, which should not be called automatically on save."
|
||||||
Basic customization. I also use smex instead of default M-x. I
|
Basic customization. I also use smex instead of default M-x. I
|
||||||
don't like heml
|
don't like heml
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
|
||||||
(scroll-bar-mode -1)
|
(scroll-bar-mode -1)
|
||||||
(tool-bar-mode -1)
|
(tool-bar-mode -1)
|
||||||
(menu-bar-mode -1)
|
(menu-bar-mode -1)
|
||||||
|
@ -192,7 +199,7 @@ Including indent-buffer, which should not be called automatically on save."
|
||||||
file is written in org-mode.
|
file is written in org-mode.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package org-bullets
|
(use-package org-bullets
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:init
|
||||||
(add-hook 'org-mode-hook 'org-bullets-mode))
|
(add-hook 'org-mode-hook 'org-bullets-mode))
|
||||||
(setq org-hide-emphasis-markers t)
|
(setq org-hide-emphasis-markers t)
|
||||||
|
@ -262,7 +269,36 @@ Including indent-buffer, which should not be called automatically on save."
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:init
|
||||||
(global-set-key "\C-s" 'swiper))
|
(global-set-key "\C-s" 'swiper))
|
||||||
|
|
||||||
|
#+END_SRC
|
||||||
|
** Company and Irony
|
||||||
|
Some shit for autocompletion and that kind of shit.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(use-package company
|
||||||
|
:ensure t
|
||||||
|
:config
|
||||||
|
(setq company-idle-delay 0)
|
||||||
|
(setq company-minimum-prefix-length 3))
|
||||||
|
(with-eval-after-load 'company
|
||||||
|
(define-key company-active-map (kbd "M-n") nil)
|
||||||
|
(define-key company-active-map (kbd "M-p") nil)
|
||||||
|
(define-key company-active-map (kbd "C-n") #'company-select-next)
|
||||||
|
(define-key company-active-map (kbd "C-p") #'company-select-previous))
|
||||||
|
|
||||||
|
(use-package company-irony
|
||||||
|
:ensure t
|
||||||
|
:config
|
||||||
|
(require 'company)
|
||||||
|
(add-to-list 'company-backends 'company-irony))
|
||||||
|
|
||||||
|
(use-package irony
|
||||||
|
:ensure t
|
||||||
|
:config
|
||||||
|
(add-hook 'c-mode-hook 'irony-mode)
|
||||||
|
(add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-option))
|
||||||
|
(with-eval-after-load 'company
|
||||||
|
(add-hook 'c-mode-hook 'company-mode))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
* ido
|
* ido
|
||||||
Ido is a replacement for keybindings such as C-x C-f and C-x b. Here
|
Ido is a replacement for keybindings such as C-x C-f and C-x b. Here
|
||||||
|
@ -304,15 +340,13 @@ Including indent-buffer, which should not be called automatically on save."
|
||||||
Powerline, because emacs default bar sucks
|
Powerline, because emacs default bar sucks
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
|
||||||
(use-package powerline
|
(use-package powerline
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:init
|
||||||
(powerline-default-theme)
|
(powerline-default-theme)
|
||||||
|
|
||||||
(set-face-background 'mode-line
|
(set-face-background 'mode-line
|
||||||
"#080c0d")
|
"#080c0d")
|
||||||
(set-face-foreground 'mode-line
|
(set-face-foreground 'mode-line
|
||||||
"#cad5d8"))
|
"#cad5d8"))
|
||||||
#+
|
#+
|
||||||
|
|
||||||
|
|
||||||
|
|
2
init.el
2
init.el
|
@ -9,7 +9,7 @@
|
||||||
("bffa9739ce0752a37d9b1eee78fc00ba159748f50dc328af4be661484848e476" "18cd5a0173772cdaee5522b79c444acbc85f9a06055ec54bb91491173bc90aaa" default)))
|
("bffa9739ce0752a37d9b1eee78fc00ba159748f50dc328af4be661484848e476" "18cd5a0173772cdaee5522b79c444acbc85f9a06055ec54bb91491173bc90aaa" default)))
|
||||||
'(package-selected-packages
|
'(package-selected-packages
|
||||||
(quote
|
(quote
|
||||||
(go-mode sudo-edit swiper solarized-theme humanoid-themes humanoid-theme laguna-theme which-key spacemacs-theme use-package minsk-theme auctex htmlize plan9-theme zencoding-mode wdl-mode visual-fill-column twittering-mode tramp-term tracking tetris ssh srv smiles-mode smex slime seti-theme scheme-complete s rust-mode restclient projectile plsense pdf-tools org-bullets nav-flash mutt-mode multiple-cursors markdown-mode magit ivy-youtube haskell-mode flycheck evil emms diredfl dired-details dashboard cyberpunk-theme button-lock all-the-icons))))
|
(company-irony company pretty-symbols pretty-mode go-mode sudo-edit swiper solarized-theme humanoid-themes humanoid-theme laguna-theme which-key spacemacs-theme use-package minsk-theme auctex htmlize plan9-theme zencoding-mode wdl-mode visual-fill-column twittering-mode tramp-term tracking tetris ssh srv smiles-mode smex slime seti-theme scheme-complete s rust-mode restclient projectile plsense pdf-tools org-bullets nav-flash mutt-mode multiple-cursors markdown-mode magit ivy-youtube haskell-mode flycheck evil emms diredfl dired-details dashboard cyberpunk-theme button-lock all-the-icons))))
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
;; custom-set-faces was added by Custom.
|
;; custom-set-faces was added by Custom.
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
|
|
Loading…
Add table
Reference in a new issue