From 7cb7601804db8bd4cb8580c6538799ffa61abd10 Mon Sep 17 00:00:00 2001 From: Takayuki Kamiyama Date: Thu, 12 Dec 2024 08:51:45 +0900 Subject: [PATCH] Default. --- .gitignore | 1 + LICENSE.txt | 13 ++++++ README.md | 8 ++++ autoload/spring_load.vim | 84 ++++++++++++++++++++++++++++++++++++++ autoload/ware_settings.vim | 72 ++++++++++++++++++++++++++++++++ 5 files changed, 178 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE.txt create mode 100644 README.md create mode 100644 autoload/spring_load.vim create mode 100644 autoload/ware_settings.vim diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..496ee2c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..9ad8e93 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,13 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (c) 2024-2025 Takayuki Kamiyama + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..b0203d3 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +### ddc_spring_load + +[ddc.vim](https://github.com/Shougo/ddc.vim) + +_This is Settings file to ddc.vim._ + +_how to use, [here](https://github.com/takkii/ddc_spring_load/wiki/ddc-spring-load)。_ + diff --git a/autoload/spring_load.vim b/autoload/spring_load.vim new file mode 100644 index 0000000..0e2141f --- /dev/null +++ b/autoload/spring_load.vim @@ -0,0 +1,84 @@ +" ddc.vim +call plug#('Shougo/ddc.vim') +call plug#('Shougo/ddc-converter_remove_overlap') +call plug#('Shougo/ddc-matcher_head') +call plug#('Shougo/ddc-sorter_rank') +call plug#('Shougo/pum.vim') +call plug#('Shougo/ddc-around') +call plug#('Shougo/ddc-source-around') +call plug#('Shougo/ddc-source-lsp') +call plug#('Shougo/ddc-ui-native') +call plug#('vim-denops/denops.vim') +call plug#('LumaKernel/ddc-file') +call plug#('neovim/nvim-lspconfig') +call plug#('uga-rosa/ddc-nvim-lsp-setup') +call plug#( 'matsui54/ddc-source-dictionary') + +" dictionary path +setlocal dictionary+=C:/Users/sudok/GitHub/ruby-dictionary3/autoload/source/ruby_method.txt + +" You must set the default ui. +call ddc#custom#patch_global('ui', 'native') + +call ddc#custom#patch_global('sources', [ + \ 'around', + \ 'file', + \ 'lsp', + \ 'dictionary' + \ ]) + +call ddc#custom#patch_global('sourceParams', #{ + \ lsp: #{ + \ snippetEngine: denops#callback#register({ + \ body -> vsnip#anonymous(body) + \ }), + \ enableResolveItem: v:true, + \ enableAdditionalTextEdit: v:true, + \ }, + \ dictionary: #{ + \ dictPaths: ['C:/Users/sudok/GitHub/ruby-dictionary3/autoload/source/ruby_method.txt'], + \ smartCase: v:true, + \ isVolatile: v:true, + \ } + \ }) + +call ddc#custom#patch_global(#{ + \ sourceOptions: #{ + \ _: #{ + \ matchers: ['matcher_head'], + \ sorters: ['sorter_rank'], + \ converters: ['converter_remove_overlap'], + \ }, + \ dictionary: #{ + \ mark: 'D', + \ }, + \ around: #{ + \ mark: 'ddc_spring_load', + \ }, + \ file: #{ + \ mark: 'file', + \ isVolatile: v:true, + \ forceCompletionPattern: '\S/\S*', + \ }, + \ lsp: #{ + \ mark: 'LSP', + \ forceCompletionPattern: '\.\w*|:\w*|->\w*', + \ }, + \}, + \ sourceParams: #{ + \ lsp: #{ + \ snippetEngine: denops#callback#register({ + \ body -> vsnip#anonymous(body) + \ }), + \ enableResolveItem: v:true, + \ enableAdditionalTextEdit: v:true, + \ confirmBehavior: 'replace', + \ isVolatile: v:true, + \ forceCompletionPattern: '\S/\S*', + \ } + \ }, + \}) + +call ddc#enable() +inoremap call pum#map#insert_relative(+1) +inoremap call pum#map#insert_relative(-1) \ No newline at end of file diff --git a/autoload/ware_settings.vim b/autoload/ware_settings.vim new file mode 100644 index 0000000..8d315da --- /dev/null +++ b/autoload/ware_settings.vim @@ -0,0 +1,72 @@ +" Terminal Settings +command! -nargs=* TES split | wincmd j | resize 20 | terminal + +" Open Terminal in insert mode +autocmd TermOpen * :startinsert + +" Terminal Mode to nonumber +autocmd TermOpen * setlocal norelativenumber +autocmd TermOpen * setlocal nonumber + +" using vim-plug. +if filereadable(expand('~/.neovim/plugged/neoruby-debugger/plugins/command.vim')) + source ~/.neovim/plugged/neoruby-debugger/plugins/command.vim +endif + +" using NERDTree +autocmd vimenter * NERDTree +let NERDTreeShowHidden=1 +nnoremap :NERDTreeToggle + +" Debug Python Keymap +nnoremap dn :lua require('dap-python').test_method() +nnoremap df :lua require('dap-python').test_class() +vnoremap ds :lua require('dap-python').debug_selection() + +" Menu Settings +set completeopt+=menuone + +" Appearance +let g:lightline = { + \ 'colorscheme': 'icebergDark', + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], + \ [ 'readonly', 'filename', 'modified' ], + \ [ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_ok' ] ], + \ }, +\ } + +let g:lightline.component_expand = { + \ 'linter_checking': 'lightline#ale#checking', + \ 'linter_warnings': 'lightline#ale#warnings', + \ 'linter_errors': 'lightline#ale#errors', + \ 'linter_ok': 'lightline#ale#ok', +\ } +let g:lightline.component_type = { + \ 'linter_checking': 'left', + \ 'linter_warnings': 'warning', + \ 'linter_errors': 'error', + \ 'linter_ok': 'left', +\ } + +let b:ale_linters = { + \ 'javascript': ['eslint', 'eslint-plugin-vue'], + \ 'python': ['pyflakes', 'pep8'], + \ 'ruby': ['rubocop'], + \ 'tex': ['textlint'], + \ 'markdown': ['textlint'], + \ 'css': ['stylelint'], +\} + +let g:ale_statusline_format = ['E%d', 'W%d', 'ok'] +let g:ale_set_loclist = 0 +let g:ale_set_quickfix = 1 +nmap (ale_next_wrap) + +function s:MoveToFileAtStart() + call feedkeys("\") + call feedkeys("\s") + call feedkeys("\l") +endfunction + +cd ~/ \ No newline at end of file