mirror of
https://github.com/prurigro/darkcloud-nvimconfig.git
synced 2024-11-23 12:14:09 -05:00
Compare commits
10 commits
2d5339fffd
...
432d4768db
Author | SHA1 | Date | |
---|---|---|---|
|
432d4768db | ||
|
e859159e49 | ||
|
dc330b2cdc | ||
|
01b4f6685d | ||
|
7b3909f45c | ||
|
cee837df73 | ||
|
418f687a0e | ||
|
221712b26a | ||
|
f3ce98466e | ||
|
806e7c5385 |
14 changed files with 96 additions and 30 deletions
12
.gitmodules
vendored
12
.gitmodules
vendored
|
@ -7,9 +7,6 @@
|
|||
[submodule "vim/bundle/lightline.vim"]
|
||||
path = vim/bundle/lightline.vim
|
||||
url = https://github.com/itchyny/lightline.vim
|
||||
[submodule "vim/bundle/vim-surround"]
|
||||
path = vim/bundle/vim-surround
|
||||
url = https://github.com/tpope/vim-surround.git
|
||||
[submodule "vim/bundle/tagbar"]
|
||||
path = vim/bundle/tagbar
|
||||
url = https://github.com/majutsushi/tagbar
|
||||
|
@ -88,3 +85,12 @@
|
|||
[submodule "vim/bundle/cmp-omni"]
|
||||
path = vim/bundle/cmp-omni
|
||||
url = https://github.com/hrsh7th/cmp-omni
|
||||
[submodule "vim/bundle/cmp-async-path"]
|
||||
path = vim/bundle/cmp-async-path
|
||||
url = https://codeberg.org/FelipeLema/cmp-async-path
|
||||
[submodule "vim/bundle/nvim-treesitter-textobjects"]
|
||||
path = vim/bundle/nvim-treesitter-textobjects
|
||||
url = https://github.com/nvim-treesitter/nvim-treesitter-textobjects
|
||||
[submodule "vim/bundle/nvim-surround"]
|
||||
path = vim/bundle/nvim-surround
|
||||
url = https://github.com/kylechui/nvim-surround
|
||||
|
|
23
init.vim
23
init.vim
|
@ -15,7 +15,7 @@
|
|||
"}}}
|
||||
|
||||
"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/vim/after,%s/local", &runtimepath, g:darkcloudpath, g:darkcloudpath, g:darkcloudpath)
|
||||
|
||||
"load colours
|
||||
if &term != "linux"
|
||||
|
@ -43,20 +43,21 @@ runtime config/settings.vim
|
|||
let g:pathogen_disabled = get(g:, "pathogen_disabled", [])
|
||||
|
||||
"don't load vim-gutentags if g:enableautotags is false or ctags isn't in path
|
||||
if !g:enableautotags || !executable('ctags')
|
||||
call add(g:pathogen_disabled, 'vim-gutentags')
|
||||
if !g:enableautotags || !executable("ctags")
|
||||
call add(g:pathogen_disabled, "vim-gutentags")
|
||||
endif
|
||||
|
||||
"don't load nvim-cmp or its dependencies if g:enablecompletion is false
|
||||
if !g:enablecompletion
|
||||
call add(g:pathogen_disabled, 'nvim-cmp')
|
||||
call add(g:pathogen_disabled, 'cmp-buffer')
|
||||
call add(g:pathogen_disabled, 'cmp-nvim-tags')
|
||||
call add(g:pathogen_disabled, 'cmp-omni')
|
||||
call add(g:pathogen_disabled, 'cmp-snippy')
|
||||
call add(g:pathogen_disabled, 'cmp-treesitter')
|
||||
call add(g:pathogen_disabled, 'nvim-snippy')
|
||||
call add(g:pathogen_disabled, 'vim-snippets')
|
||||
call add(g:pathogen_disabled, "cmp-async-path")
|
||||
call add(g:pathogen_disabled, "cmp-buffer")
|
||||
call add(g:pathogen_disabled, "cmp-nvim-tags")
|
||||
call add(g:pathogen_disabled, "cmp-omni")
|
||||
call add(g:pathogen_disabled, "cmp-snippy")
|
||||
call add(g:pathogen_disabled, "cmp-treesitter")
|
||||
call add(g:pathogen_disabled, "nvim-cmp")
|
||||
call add(g:pathogen_disabled, "nvim-snippy")
|
||||
call add(g:pathogen_disabled, "vim-snippets")
|
||||
endif
|
||||
|
||||
"use pathogen to load plugins that haven't been disabled
|
||||
|
|
|
@ -121,6 +121,7 @@ For a complete list of mappings specific to **darkcloud-nvimconfig**, check the
|
|||
* [lightline.vim](https://github.com/itchyny/lightline.vim): A light and configurable statusline/tabline for Vim
|
||||
* [lightline-ale](https://github.com/maximbaz/lightline-ale): Provides ALE indicator for the lightline vim plugin
|
||||
* [nvim-cmp](https://github.com/hrsh7th/nvim-cmp): A completion engine plugin for neovim written in Lua
|
||||
* [cmp-async-path](https://codeberg.org/FelipeLema/cmp-async-path): Async filesystem path source for nvim-cmp
|
||||
* [cmp-buffer](https://github.com/hrsh7th/cmp-buffer): Buffer words source for nvim-cmp
|
||||
* [cmp-nvim-tags](https://github.com/quangnguyen30192/cmp-nvim-tags): Tags source for nvim-cmp
|
||||
* [cmp-omni](https://github.com/hrsh7th/cmp-omni): Omnifunc source for cmp-nvim
|
||||
|
@ -128,7 +129,9 @@ For a complete list of mappings specific to **darkcloud-nvimconfig**, check the
|
|||
* [cmp-treesitter](https://github.com/ray-x/cmp-treesitter): Treesitter source for nvim-cmp
|
||||
* [nvim-snippy](https://github.com/dcampos/nvim-snippy): Snippet plugin for Neovim written in Lua
|
||||
* [vim-snippets](https://github.com/honza/vim-snippets): Snippets files for various programming languages
|
||||
* [nvim-surround](https://github.com/kylechui/nvim-surround): Add/change/delete surrounding delimiter pairs with ease
|
||||
* [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter): Treesitter configurations and abstraction layer for Neovim
|
||||
* [nvim-treesitter-textobjects](https://github.com/nvim-treesitter/nvim-treesitter-textobjects): Syntax aware text-objects, select, move, swap, and peek support
|
||||
* [ReplaceWithRegister](https://github.com/vim-scripts/ReplaceWithRegister): Replace text with the contents of a register (for paste+replace without writing over the buffer)
|
||||
* [splitjoin.vim](https://github.com/AndrewRadev/splitjoin.vim): Simplifies the transition between multiline and single-line code
|
||||
* [tabular](https://github.com/godlygeek/tabular): Vim script for text filtering and alignment
|
||||
|
@ -139,11 +142,10 @@ For a complete list of mappings specific to **darkcloud-nvimconfig**, check the
|
|||
* [vim-pathogen](https://github.com/tpope/vim-pathogen): A plugin to load other plugins while keeping them isolated in their own directory structure rather than all dumped together
|
||||
* [vim-polyglot-darkcloud](https://github.com/prurigro/vim-polyglot-darkcloud): The darkcloud-nvimconfig fork of a meta-package that attempts to provide the best syntax plugins for each file type
|
||||
* [vim-signify](https://github.com/mhinz/vim-signify): When a version controlled file is changed, this displays a column showing where and how, and allows for navigation to and between differences
|
||||
* [vim-surround](https://github.com/tpope/vim-surround): Provides functionality to exchange surrounding delimiters and xml-style tags with another, or simply remove them
|
||||
* [vim-repeat](https://github.com/tpope/vim-repeat): A library used by vim-surround to allow its delimiter-switching functions to be repeated with the `.` command
|
||||
* [vim-togglelist](https://github.com/milkypostman/vim-togglelist): A simple plugin for vim that allows you to bind a key to toggle the Location List and the Quickfix List
|
||||
* [vim-trailing-whitespace](https://github.com/bronson/vim-trailing-whitespace): Highlights and allows for the easy removal of trailing whitespace in documents
|
||||
* [vim-unimpaired](https://github.com/tpope/vim-unimpaired): Pairs of handy bracket mappings
|
||||
* [vim-repeat](https://github.com/tpope/vim-repeat): Enable repeating supported plugin maps with "."
|
||||
|
||||
## Credits
|
||||
|
||||
|
|
1
vim/bundle/cmp-async-path
Submodule
1
vim/bundle/cmp-async-path
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 6eeaf0f3968ea1e6f135a5ee5aa01828f66611a5
|
1
vim/bundle/nvim-surround
Submodule
1
vim/bundle/nvim-surround
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 84a26afce16cffa7e3322cfa80a42cddf60616eb
|
1
vim/bundle/nvim-treesitter-textobjects
Submodule
1
vim/bundle/nvim-treesitter-textobjects
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit b7a0bfa3e93697ca5b61b15df633404bf8f45883
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 3d188ed2113431cf8dac77be61b842acb64433d9
|
|
@ -21,7 +21,7 @@ let colors_name = "darkcloud"
|
|||
|
||||
"sets the highlighting for the given group | format: s:C('Name','Foreground','Background','Style')
|
||||
fun! s:C(group, fg, bg, attr)
|
||||
if has("gui_running")
|
||||
if has("gui_running") || &termguicolors
|
||||
let l:term = "gui"
|
||||
else
|
||||
let l:term = "cterm"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
if has("gui_running")
|
||||
if has("gui_running") || &termguicolors
|
||||
let g:cBlack = '#000000'
|
||||
let g:cWhite = '#ffffff'
|
||||
'
|
||||
|
|
|
@ -166,6 +166,8 @@
|
|||
" <Shift-Ctrl-Up> | (N) -> vim-move: move a line up one line
|
||||
" <Shift-Ctrl-Down> | (N) -> vim-move: move a line down one line
|
||||
"
|
||||
" ]g | (N) -> next difference (vimdiff/signify)
|
||||
" [g | (N) -> previous difference (vimdiff/signify)
|
||||
" >> | (N) -> next difference (vimdiff/signify)
|
||||
" << | (N) -> previous difference (vimdiff/signify)
|
||||
"
|
||||
|
@ -577,13 +579,11 @@
|
|||
nmap <S-C-Up> <Plug>MoveLineUp
|
||||
nmap <S-C-Down> <Plug>MoveLineDown
|
||||
|
||||
"map signify to ]c and [c
|
||||
let g:signify_mapping_next_hunk = ']c'
|
||||
let g:signify_mapping_prev_hunk = '[c'
|
||||
|
||||
"move to next/previous difference (vimdiff/signify)
|
||||
nmap >> ]c
|
||||
nmap << [c
|
||||
nmap ]g <plug>(signify-next-hunk)
|
||||
nmap [g <plug>(signify-prev-hunk)
|
||||
nmap >> ]g
|
||||
nmap << [g
|
||||
"}
|
||||
|
||||
"SELECTION:{
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
require("ts_context_commentstring").setup {}
|
||||
require("ts_context_commentstring").setup()
|
||||
require("Comment").setup()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
if (vim.g.enablecompletion == 1) then
|
||||
local snippy = require("snippy")
|
||||
local cmp = require"cmp"
|
||||
local cmp = require("cmp")
|
||||
|
||||
local has_words_before = function()
|
||||
unpack = unpack or table.unpack
|
||||
|
@ -51,6 +51,7 @@ if (vim.g.enablecompletion == 1) then
|
|||
{ name = "buffer" },
|
||||
{ name = "treesitter" },
|
||||
{ name = "omni" },
|
||||
{ name = "async_path" },
|
||||
{ name = "tags", option = { current_buffer_only = true } },
|
||||
{ name = "snippy" },
|
||||
}),
|
||||
|
|
3
vim/config/plugins/nvim-surround.lua
Normal file
3
vim/config/plugins/nvim-surround.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
require("nvim-surround").setup({
|
||||
move_cursor = false
|
||||
})
|
|
@ -9,7 +9,7 @@ if (vim.g.enabletreesitter == 1) then
|
|||
|
||||
vim.opt.runtimepath:append(parser_dir)
|
||||
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = { "bash", "c", "cpp", "git_config", "html", "java", "javascript", "json", "lua", "php", "python", "query", "rust", "toml", "typescript", "vim", "vue" },
|
||||
sync_install = false,
|
||||
auto_install = false,
|
||||
|
@ -19,6 +19,57 @@ if (vim.g.enabletreesitter == 1) then
|
|||
enable = true,
|
||||
disable = {},
|
||||
additional_vim_regex_highlighting = false,
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true, -- Automatically jump forward to textobj
|
||||
|
||||
keymaps = {
|
||||
[ "ac" ] = { query = "@class.outer", desc = "Select outer 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" },
|
||||
[ "if" ] = { query = "@function.inner", desc = "Select inner part of a function region" },
|
||||
[ "as" ] = { query = "@scope", query_group = "locals", desc = "Select language scope" },
|
||||
},
|
||||
|
||||
selection_modes = {
|
||||
[ "@parameter.outer" ] = "v",
|
||||
[ "@parameter.inner" ] = "v",
|
||||
[ "@class.inner" ] = "V",
|
||||
[ "@class.outer" ] = "V",
|
||||
[ "@function.outer" ] = "V",
|
||||
[ "@function.inner" ] = "V",
|
||||
},
|
||||
|
||||
include_surrounding_whitespace = false,
|
||||
},
|
||||
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true, -- whether to set jumps in the jumplist
|
||||
|
||||
goto_next_start = {
|
||||
[ "]c" ] = { query = "@class.outer", desc = "Next class 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 = {
|
||||
[ "[c" ] = { query = "@class.outer", desc = "Prevoius class start" },
|
||||
[ "[f" ] = { query = "@function.outer", desc = "Previous function start" },
|
||||
},
|
||||
|
||||
goto_previous_end = {
|
||||
[ "[C" ] = { query = "@class.outer", desc = "Previous class end" },
|
||||
[ "[F" ] = { query = "@function.outer", desc = "Previous function end" },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue