Skip to content

Latest commit

 

History

History
235 lines (215 loc) · 9.16 KB

note.org

File metadata and controls

235 lines (215 loc) · 9.16 KB

Note -*- mode:org; -*-

Template: custom.el

(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.
 '(blink-cursor-mode t)
 '(conda-anaconda-home "d:/Scoop/apps/anaconda3/current")
 '(column-number-mode t)
 '(cursor-type 'box)
 '(dart-sdk-path "d:/Scoop/apps/flutter/current/bin/cache/dart-sdk/")
 '(find-ls-option '("-exec ls -ld {} \";\"" . "-ld"))
 '(flutter-sdk-path "d:/Scoop/apps/flutter/current/")
 '(gc-cons-threshold 3200000)
 '(global-display-line-numbers-mode t)
 '(httpd-host "0.0.0.0")
 '(httpd-port 2020)
 '(indent-tabs-mode nil)
 '(indicate-empty-lines t)
 '(minimap-window-location (quote right))
 '(org-directory "~/notes/org")
 '(org-roam-directory "~/notes/org/roam")
 '(org-plantuml-jar-path "d:/Scoop/apps/plantuml/current/plantuml.jar")
 '(deft-directory "~/notes/org")
 '(select-enable-clipboard t)
 '(semantic-idle-scheduler-idle-time 5)
 '(semantic-symref-tool (quote global))
 '(skeletor-user-directory "~/.emacs.d/init/init-skeletor-projects")
 '(size-indication-mode t)
 '(speedbar-show-unknown-files t)
 '(ellocate-scan-dirs (quote
                       (("~/" "~/.cache/ellocate/home-db")
                        ("/mnt/USB" "~/ellocate-usb-drive-db")
                        ;; I want this directory to be re-scanned on first search after every emacs restart by not creating a database file for it
                        ("/mnt/USB2" nil)
                         ;; Never make your scan paths overlap like this:
                         ;; ("/mnt/USB2/newFolder" nil)
                         ;; This is pretty useful if you have many USB devices, but remember to not overlap like this would if it wasn't commented (because the subdirectory /mnt/USB is also scanned as defined above)
                         ;; ("/mnt/" nil)
                         )))
 '(c-macro-cppflags " -DDEBUG -I d:/path/to/custom/include ")
 '(c-macro-preprocessor "cpp -C -x c++ -std=c++11")
 '(c-macro-prompt-flag t)
 '(cmake-ide-build-pool-dir "e:/any/path/to/cache/cmake-ide-build-pool")
 '(cmake-ide-build-pool-use-persistent-naming t)
 '(cmake-ide-cmake-opts "-DCMAKE_BUILD_TYPE=Debug")
 '(sql-connection-alist
   (("mysql-localhost"
     (sql-product 'mysql)
     (sql-user "root")
     (sql-database "")
     (sql-server "localhost"))
    ("mysql-dbhost"
     (sql-product 'mysql)
     (sql-user "root")
     (sql-database "")
     (sql-server "dbhost"))))
 '(tcl-application "C:/msys64/mingw64/bin/wish.exe")
 '(ispell-program-name "d:/Scoop/shims/aspell.exe")
 '(visual-line-mode nil t))

(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.
 '(default ((t (:family "JetBrainsMono Nerd Font Mono" :foundry "outline" :slant normal :weight normal :height 98 :width normal)))))

(setenv "WORKON_HOME" "/home/zzfnohell/dev/pyenvs")

Windows

$+name: windows-extra

(custom-set-variables
 '(citre-readtags-program "c:/Scoop/apps/universal-ctags/current/readtags.exe")
 '(citre-ctags-program "c:/Scoop/apps/universal-ctags/current/ctags.exe")
 '(citre-gtags-args '("--compact")))

Cedet Project

Windows Cpp Root Project

(ede-cpp-root-project
 :name "win-cpp-root"
 :file "~/.emacs.d/cedet-projects/Makefile"
 :system-include-path
 '("c:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/shared/"
   "c:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/um/"
   "c:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/ucrt/"
   "c:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/winrt/"
   "c:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/cppwinrt/winrt/"))

Project Template

(ede-cpp-root-project "template-project-name"
                      :file "/path/to/project/Makefile"
                      :include-path '("include/" "include1/")
                      :system-include-path
                      '("/usr/include"
                        "/usr/local/include"
                        "/path/to/sys/include"))
(ede-cpp-root-project "template-project-name"
                      :file "/path/to/project/Makefile"
                      :include-path '("include/" "include1/")
                      :system-include-path
                      '("/usr/include"
                        "/usr/local/include"
                        "/path/to/sys/include"))

Include Dirs

Cedet Semantic

PATH: ~/.emacs.d/custom-semantic.el

;; on windows nt
  (semantic-add-system-include "c:/msys64/mingw64/include/" 'c-mode)
  (semantic-add-system-include "c:/msys64/mingw64/include/" 'c++-mode)

Clang Include

PATH: .dir-locals.el

((nil . ((company-clang-arguments . ("-I/home/<user>/project_root/include1/"
                                     "-I/home/<user>/project_root/include2/")))))

Clang Include

PATH: .dir-locals.el OR PATH: ~/.emacs.d/custom-company-c-headers.el

(add-to-list 'company-c-headers-path-system "c:/msys64/mingw64/include")

Debugging Templates

Debug on entry

(defun func-sample () (message "ABC"))
(debug-on-entry #'func-sample)

Debug on error

(setq debug-on-error t)

Debug on messages

(setq debug-on-message ".*ad-handle-definition.*")
(setq debug-on-message ".*error.*")

Custom Packages

imaxima

'(imaxima-equation-color "black")
'(imaxima-fg-color "black")

Tide

Create jsconfig.json in the root folder of your project. jsconfig.json is tsconfig.json with allowJs attribute set to true.

{
  "compilerOptions": {
    "target": "es2017",
    "allowSyntheticDefaultImports": true,
    "noEmit": true,
    "checkJs": true,
    "jsx": "react",
    "lib": [ "dom", "es2017" ]
  }
}

Dir Local Variables

** cc-mode (.dir-locals.el)

((nil . ((ggtags-process-environment . ("GTAGSLABEL=pygments"
                                        "GTAGSDBPATH=C:\\sdk"
                                        "GTAGSROOT=C:\\sdk"
                                        "GTAGSLIBPATH=C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22000.0\\um"
                                        "GTAGSOBJDIRPREFIX=C:\\cache\\gtagsdb"))
    (ggtags-extra-args . ("--verbose" "--statistics"))
    (ggtags-use-idutils . t)
    (buffer-read-only . nil)
    (eval . (message "hello sdk"))))

 (c++-mode . ((c-basic-offset . 4)
              (tab-width . 4)
              (indent-tabs-mode . t)
              (compile-command . "build.bat")
              (cd-compile-directory . "C:\\src\\sampleapp")
              (cc-search-directories . ("C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\shared"
                                        "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\ucrt"
                                        "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\um"
                                        "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\winrt"))
              (flycheck-clang-include-path . ("c:/sdk/include"
                                              "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\um"))))

 (c-mode . ((c-basic-offset . 4)
            (tab-width . 4)
            (indent-tabs-mode . t)
            (compile-command . "build.bat")
            (cd-compile-directory . "C:\\src\\sampleapp")
            (cc-search-directories . ("C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\shared"
                                      "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\ucrt"
                                      "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\um"
                                      "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\winrt"))
            (flycheck-clang-include-path . ("c:/sdk/include"
                                           "C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.22000.0\\um")))))