Compare commits

..

3 commits

Author SHA1 Message Date
Kevin MacMartin
2c60090d33 Update submodules 2024-08-15 17:37:40 -04:00
Kevin MacMartin
5f5b492cfe Improve treesitter keybindings and add bindings for parameters 2024-08-15 17:31:52 -04:00
Kevin MacMartin
747254e330 No longer have a default install location or require the darkcloudpath variable to be set 2024-08-15 17:06:26 -04:00
10 changed files with 32 additions and 25 deletions

View file

@ -9,13 +9,11 @@
" " " "
"=============================================================" "============================================================="
"darkcloud neovim config folder path: {{{ "load config path
"the location of darkcloud-nvimconfig (default is /etc/darkcloud-nvimconfig) exec 'source ' . expand('<sfile>:p:h') . '/local/path.vim'
let g:darkcloudpath = get(g:, "darkcloudpath", "/etc/darkcloud-nvimconfig")
"}}}
"add config directory: (distro-agnostic system-wide) "add config directory: (distro-agnostic system-wide)
let &runtimepath = printf("%s,%s/vim,%s/vim/after,%s/local", &runtimepath, g:darkcloudpath, g:darkcloudpath, g:darkcloudpath) let &runtimepath = printf("%s,%s/vim,%s/local", &runtimepath, g:darkcloudpath, g:darkcloudpath)
"load colours "load colours
runtime colors/palette.vim runtime colors/palette.vim

View file

@ -26,8 +26,7 @@ A theme, config and collection of plugins for Neovim
## Installation ## Installation
1. Clone the darkcloud-nvimconfig repo and run the `update` script 1. Clone the darkcloud-nvimconfig repo and run the `update` script
2. By default darkcloud-nvimconfig expects to be installed @ `/etc/darkcloud-nvimconfig`, if you're installing it elsewhere you should add `let g:darkcloudpath = "/path/to/darkcloud-nvimconfig"` to your neovim init 2. Add `source /path/to/darkcloud-nvimconfig/init.vim` to your neovim init
3. Add `source /path/to/darkcloud-nvimconfig/init.vim` to your neovim init (after `let g:darkcloudpath = ...` if present)
## Configuration ## Configuration

4
update
View file

@ -13,6 +13,7 @@
# #
user_vim_config=local/user.vim user_vim_config=local/user.vim
path_config=local/path.vim
local_bundle_dir=local/bundle local_bundle_dir=local/bundle
error_log=update-errors.log error_log=update-errors.log
@ -124,6 +125,9 @@ printf '\n%s\n' "$cbg_black ~~~ DarkCloud Neovim Config Update Tool ~~~ $c_reset
fi fi
} }
# create or update path.vim
printf '%s\n' "let g:darkcloudpath = \"$(readlink -f "$script_home")\"" > "$path_config"
# create user.vim if it doesn't exist # create user.vim if it doesn't exist
[[ -e "$user_vim_config" ]] || { [[ -e "$user_vim_config" ]] || {
printf '\n%s' "$cbg_blue >> Creating user config file:$c_reset" printf '\n%s' "$cbg_blue >> Creating user config file:$c_reset"

@ -1 +1 @@
Subproject commit 48d73c87c3c321e6298755abc5449267192d07e6 Subproject commit 954682108d21b412561fb32e3fa766c7ee539984

@ -1 +1 @@
Subproject commit e5a05ba5e298cc1e1dad8eb8095b8d4d89a7f793 Subproject commit bfb50de9cb0673a3bff620d881f690fb7e0d1328

@ -1 +1 @@
Subproject commit ca93cb2c34b67ab22d01976fc90bc95627a3317f Subproject commit ced6375723b20616282f9f6a1018a63ae19b106a

@ -1 +1 @@
Subproject commit 6b5f95aa4d24f2c629a74f2c935c702b08dbde62 Subproject commit 375c2d86cee6674afd75b4f727ce3a80065552f7

@ -1 +1 @@
Subproject commit 3f9236a3a8cfa1a4929d0fd8296722e4ed3550be Subproject commit a03b22e96dd894d091e4318c749814132f50dc82

@ -1 +1 @@
Subproject commit 96d79529edc3dee1ccf2ce7b75a88cb546ec2501 Subproject commit f0a3184d9f90b96b044d5914625a25c554d7f301

View file

@ -27,6 +27,8 @@ if (vim.g.enabletreesitter == 1) then
lookahead = true, -- Automatically jump forward to textobj lookahead = true, -- Automatically jump forward to textobj
keymaps = { keymaps = {
[ "ap" ] = { query = "@parameter.outer", desc = "Select outer part of a parameter region" },
[ "ip" ] = { query = "@parameter.inner", desc = "Select inner part of a parameter region" },
[ "ac" ] = { query = "@class.outer", desc = "Select outer part of a class region" }, [ "ac" ] = { query = "@class.outer", desc = "Select outer part of a class region" },
[ "ic" ] = { query = "@class.inner", desc = "Select inner part of a class region" }, [ "ic" ] = { query = "@class.inner", desc = "Select inner part of a class region" },
[ "af" ] = { query = "@function.outer", desc = "Select outer part of a function region" }, [ "af" ] = { query = "@function.outer", desc = "Select outer part of a function region" },
@ -37,10 +39,10 @@ if (vim.g.enabletreesitter == 1) then
selection_modes = { selection_modes = {
[ "@parameter.outer" ] = "v", [ "@parameter.outer" ] = "v",
[ "@parameter.inner" ] = "v", [ "@parameter.inner" ] = "v",
[ "@class.inner" ] = "V", [ "@class.inner" ] = "v",
[ "@class.outer" ] = "V", [ "@class.outer" ] = "v",
[ "@function.outer" ] = "V", [ "@function.outer" ] = "v",
[ "@function.inner" ] = "V", [ "@function.inner" ] = "v",
}, },
include_surrounding_whitespace = false, include_surrounding_whitespace = false,
@ -51,23 +53,27 @@ if (vim.g.enabletreesitter == 1) then
set_jumps = true, -- whether to set jumps in the jumplist set_jumps = true, -- whether to set jumps in the jumplist
goto_next_start = { goto_next_start = {
[ "]p" ] = { query = "@parameter.outer", desc = "Next parameter start" },
[ "]c" ] = { query = "@class.outer", desc = "Next class start" }, [ "]c" ] = { query = "@class.outer", desc = "Next class start" },
[ "]f" ] = { query = "@function.outer", desc = "Next function start" }, [ "]f" ] = { query = "@function.outer", desc = "Next function start" },
}, },
goto_next_end = {
[ "]C" ] = { query = "@class.outer", desc = "Next class end" },
[ "]F" ] = { query = "@function.outer", desc = "Next function end" },
},
goto_previous_start = { goto_previous_start = {
[ "[c" ] = { query = "@class.outer", desc = "Prevoius class start" }, [ "[p" ] = { query = "@parameter.outer", desc = "Previous parameter start" },
[ "[c" ] = { query = "@class.outer", desc = "Previous class start" },
[ "[f" ] = { query = "@function.outer", desc = "Previous function start" }, [ "[f" ] = { query = "@function.outer", desc = "Previous function start" },
}, },
goto_next_end = {
[ "}P" ] = { query = "@parameter.outer", desc = "Next parameter end" },
[ "}C" ] = { query = "@class.outer", desc = "Next class end" },
[ "}F" ] = { query = "@function.outer", desc = "Next function end" },
},
goto_previous_end = { goto_previous_end = {
[ "[C" ] = { query = "@class.outer", desc = "Previous class end" }, [ "{P" ] = { query = "@parameter.outer", desc = "Previous parameter end" },
[ "[F" ] = { query = "@function.outer", desc = "Previous function end" }, [ "{C" ] = { query = "@class.outer", desc = "Previous class end" },
[ "{F" ] = { query = "@function.outer", desc = "Previous function end" },
}, },
}, },
}, },