Skip to content

Instantly share code, notes, and snippets.

@fxfactorial
Created September 6, 2015 20:27
Show Gist options
  • Save fxfactorial/9d55ff06a5d42ee228ad to your computer and use it in GitHub Desktop.
Save fxfactorial/9d55ff06a5d42ee228ad to your computer and use it in GitHub Desktop.
(defun os-s ()
"Only way to get semantic to play nicely with desired files,
very strange, *remember* to add the trailing slash for directories."
(interactive)
(setq company-c-headers-path-system '("/ssh:os:/home/w4118/hmwk6-prog/flo-kernel/arch/arm/include/"
"/ssh:os:/home/w4118/hmwk6-prog/flo-kernel/include/"))
(setq company-c-headers-path-user '(" /ssh:os:/home/w4118/hmwk6-prog/flo-kernel/include/"))
(semantic-reset-system-include)
(setq semantic-dependency-include-path '("/ssh:os:/home/w4118/hmwk6-prog/flo-kernel/kernel/"))
(semantic-add-system-include "/ssh:os:/home/w4118/hmwk6-prog/flo-kernel/arch/arm/include/")
(semantic-add-system-include "/ssh:os:/home/w4118/hmwk6-prog/flo-kernel/include/")
(setq-default semantic-symref-tool 'global)
;;For tramp mainly
;; (setq default-directory "/ssh:os:")
;;Doesn't seem to work since this is a function defined in the shell?
;; (local-set-key (kbd "M-z") '(lambda ()
;; (shell-command "b")))
(mapc (lambda (item)
(add-to-list 'tramp-remote-path item))
'("/home/w4118/utils/android-sdk-linux/tools"
"/home/w4118/utils/android-sdk-linux/platform-tools"
"/home/w4118/utils/arm-eabi-4.6/bin"
"/home/w4118/utils/bin"
"/home/w4118/utils/arm-2013.11/bin"))
(setq compile-command (concat
"make -j8 ARCH=arm CROSS_COMPILE=/home/w4118/utils/arm-eabi-4.6/bin/arm-eabi-"
" -C /home/w4118/hmwk6-prog/flo-kernel")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment