Advertisement
mronetwo

kakrc

May 27th, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. source "%val{config}/plugins/plug.kak/rc/plug.kak"
  2.  
  3. # Install this to get readtags
  4. # Void Linux, install: automake
  5. # https://github.com/universal-ctags/ctags
  6.  
  7. set global tabstop 2
  8. set global indentwidth 2
  9.  
  10. # The termcmd is option of the x11 module.
  11. # See x11.kak to see its options.
  12. hook global ModuleLoaded x11 %{
  13. # You can print this variable with :echo %opt{termcmd}
  14. # In the shell expansion you refer to this option with kak_opt_termcmd.
  15. set-option global termcmd "sakura -x"
  16. }
  17.  
  18. define-command -hidden -params 1.. bspwm-new-impl %{
  19. evaluate-commands %sh{
  20. if [ -z "$kak_opt_termcmd" ]; then
  21. echo "echo -markup '{Error}termcmd option is not set'"
  22. exit
  23. fi
  24. bspwm_split="$1"
  25. shift
  26. # Clone the window with the same buffer, on the same line.
  27. kakoune_args="-e 'execute-keys $@ :buffer <space> $kak_buffile <ret> $kak_cursor_line g'"
  28. {
  29. # echo $kak_opt_termcmd "kak -c $kak_session $kakoune_args" > /tmp/debug
  30. exec $kak_opt_termcmd "kak -c $kak_session $kakoune_args"
  31. } < /dev/null > /dev/null 2>&1 &
  32. }
  33. }
  34.  
  35. plug "alexherbo2/kakoune-dracula-theme" theme
  36. colorscheme dracula
  37.  
  38. add-highlighter global/ number-lines -hlcursor
  39. add-highlighter global/ column 100 default,rgb:666688
  40. add-highlighter global/ regex \b(TODO|FIXME|XXX|NOTE)\b 0:default+b
  41.  
  42. plug "andreyorst/tagbar.kak" config %{
  43. } defer "tagbar" %{
  44. set-option global tagbar_sort false
  45. set-option global tagbar_size 40
  46. set-option global tagbar_display_anon false
  47. }
  48.  
  49. # Map the fzf-mode but defer everything else to onModuleLoad fzf hook.
  50. plug "andreyorst/fzf.kak" config %{
  51. map global normal <c-p> ': fzf-mode<ret>'
  52. } defer "fzf" %{
  53. }
  54.  
  55. plug "https://gitlab.com/fsub/kakoune-mark" config %{
  56. }
  57.  
  58. plug "danr/kakoune-easymotion" config %{
  59. map global normal <c-e> ':enter-user-mode easymotion<ret>'
  60. }
  61.  
  62. # Enable editor config.
  63. hook global BufOpenFile .* %{ editorconfig-load }
  64. hook global BufNewFile .* %{ editorconfig-load }
  65.  
  66. # Column marker.
  67. hook global WinSetOption filetype=(markdown) %{
  68. add-highlighter global/ column 100 default,rgb:666688
  69. }
  70.  
  71. # Highlight the word under the cursor.
  72. declare-option -hidden regex curword
  73. set-face global CurWord default,rgb:4a4a4a
  74.  
  75. # Highlight the words on which the cursor is.
  76. hook global NormalIdle .* %{
  77. eval -draft %{ try %{
  78. exec <space><a-i>w <a-k>\A\w+\z<ret>
  79. set-option buffer curword "\b\Q%val{selection}\E\b"
  80. } catch %{
  81. set-option buffer curword ''
  82. } }
  83. }
  84. add-highlighter global/ dynregex '%opt{curword}' 0:CurWord
  85.  
  86. map global normal '#' :comment-line<ret>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement