Dolphin type neovim.
a ton of plugins
37 files changed, +188 -19
+36-16init.vim
| @@ -13,13 +13,24 @@ set shiftwidth=4 | ||
| 13 | 13 | set tabstop=4 |
| 14 | 14 | set encoding=utf8 |
| 15 | 15 | set history=5000 |
| 16 | -set clipboard=unnamedplus | |
| 16 | +colorscheme habamax | |
| 17 | +highlight Normal ctermbg=none " Remove background color | |
| 18 | +:au FocusLost * :wa " Auto save when focus is lost | |
| 19 | +:au BufLeave * :wa " Auto save when buffer is left | |
| 20 | +vnoremap p "0p " Keep last register after pasting in visual mode | |
| 21 | +nmap <leader>f gg=G <C-o> <C-o> | |
| 22 | +nmap <leader>t :Telescope find_files<CR> | |
| 23 | +set autoread | |
| 24 | +nmap gn :bnext<CR> | |
| 25 | +nmap gp :bprevious<CR> | |
| 26 | +nmap gq :bd<CR> :bn<CR> :NERDTreeFind<CR><CR> | |
| 17 | 27 | |
| 18 | 28 | |
| 19 | 29 | " Vim-Plug settings |
| 20 | 30 | call plug#begin() |
| 21 | 31 | Plug 'preservim/nerdtree' | |
| 22 | - \ Plug 'Xuyuanp/nerdtree-git-plugin' | |
| 32 | + \ Plug 'Xuyuanp/nerdtree-git-plugin' | | |
| 33 | + \ Plug 'ryanoasis/vim-devicons' | |
| 23 | 34 | Plug 'neoclide/coc.nvim', {'branch': 'release'} |
| 24 | 35 | Plug 'github/copilot.vim' |
| 25 | 36 | Plug 'vim-airline/vim-airline-themes' |
| @@ -27,9 +38,16 @@ Plug 'tpope/vim-commentary' | ||
| 27 | 38 | Plug 'nvim-lua/plenary.nvim' |
| 28 | 39 | Plug 'nvim-telescope/telescope.nvim', { 'tag': '0.1.5' } |
| 29 | 40 | Plug 'akinsho/toggleterm.nvim', |
| 30 | -Plug 'vim-airline/vim-airline' | |
| 41 | +Plug 'vim-airline/vim-airline', | |
| 42 | +Plug 'tpope/vim-fugitive', | |
| 43 | +Plug 'rbong/vim-flog', | |
| 44 | +Plug 'tpope/vim-capslock', | |
| 45 | +Plug 'Shougo/denite.nvim', | |
| 46 | +Plug 'junegunn/fzf', | |
| 47 | +Plug 'prabirshrestha/vim-lsp', | |
| 31 | 48 | call plug#end() |
| 32 | 49 | |
| 50 | + | |
| 33 | 51 | " NERDTree settings |
| 34 | 52 | nnoremap <leader>n :NERDTreeFocus<CR> |
| 35 | 53 | autocmd VimEnter * NERDTree |
| @@ -46,32 +64,34 @@ nnoremap <silent> <space>d :<C-u>CocList diagnostics<cr> | ||
| 46 | 64 | nmap <leader>do <Plug>(coc-codeaction) |
| 47 | 65 | nmap <leader>rn <Plug>(coc-rename) |
| 48 | 66 | let g:coc_global_extensions = [ |
| 49 | - \ 'coc-tsserver', | |
| 50 | - \ 'coc-json', | |
| 51 | - \ 'coc-css', | |
| 52 | - \ 'coc-eslint', | |
| 53 | - \ 'coc-prettier', | |
| 54 | - \ 'coc-pyright' | |
| 55 | - \ ] | |
| 67 | + \ 'coc-tsserver', | |
| 68 | + \ 'coc-json', | |
| 69 | + \ 'coc-css', | |
| 70 | + \ 'coc-eslint', | |
| 71 | + \ 'coc-prettier', | |
| 72 | + \ 'coc-pyright' | |
| 73 | + \ ] | |
| 56 | 74 | " Make <CR> to accept selected completion item or notify coc.nvim to format |
| 57 | 75 | " <C-g>u breaks current undo, please make your own choice |
| 58 | 76 | inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm() |
| 59 | - \: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>" | |
| 77 | + \: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>" | |
| 60 | 78 | |
| 61 | 79 | |
| 62 | 80 | " Airline settings |
| 63 | -autocmd VimEnter * AirlineTheme bubblegum | |
| 64 | 81 | set laststatus=2 |
| 65 | 82 | let g:airline#extensions#tabline#enabled = 1 |
| 83 | +let g:airline#extensions#capslock#enabled = 1 | |
| 66 | 84 | let g:airline_powerline_fonts = 1 |
| 67 | 85 | let g:airline_statusline_ontop=0 |
| 68 | -let g:airline_theme='ayu_light' | |
| 86 | +let g:airline_theme='bubblegum' | |
| 69 | 87 | let g:airline#extensions#tabline#formatter = 'default' |
| 70 | 88 | set guifont=Hack |
| 71 | 89 | |
| 72 | 90 | |
| 73 | 91 | " Toggleterm settings |
| 74 | 92 | lua require("toggleterm").setup({ |
| 75 | - \ direction = 'float', | |
| 76 | - \ open_mapping = [[<c-\>]], | |
| 77 | - \ }) | |
| 93 | + \ direction = 'float', | |
| 94 | + \ open_mapping = [[<c-\>]], | |
| 95 | + \ }) | |
| 96 | + | |
| 97 | + |
+0-3main.py
| @@ -1,3 +0,0 @@ | ||
| 1 | -with open('init.vim', 'r') as file: | |
| 2 | - data = file.read() | |
| 3 | - print(data) |
+7-0samples/Cargo.lock
| @@ -0,0 +1,7 @@ | ||
| 1 | +# This file is automatically @generated by Cargo. | |
| 2 | +# It is not intended for manual editing. | |
| 3 | +version = 3 | |
| 4 | + | |
| 5 | +[[package]] | |
| 6 | +name = "samples" | |
| 7 | +version = "0.1.0" |
+8-0samples/Cargo.toml
| @@ -0,0 +1,8 @@ | ||
| 1 | +[package] | |
| 2 | +name = "samples" | |
| 3 | +version = "0.1.0" | |
| 4 | +edition = "2021" | |
| 5 | + | |
| 6 | +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
| 7 | + | |
| 8 | +[dependencies] |
+0-0samples/cquicksort
Binary file changed.
+71-0samples/quicksort.c
| @@ -0,0 +1,71 @@ | ||
| 1 | +// quicksort | |
| 2 | + | |
| 3 | +#include <stdio.h> | |
| 4 | +#include <stdlib.h> | |
| 5 | +#include <time.h> | |
| 6 | + | |
| 7 | +#define N 10 | |
| 8 | + | |
| 9 | +void quicksort(int a[], int low, int high); | |
| 10 | +int partition(int a[], int low, int high); | |
| 11 | + | |
| 12 | +int main() { | |
| 13 | + int a[N]; | |
| 14 | + int i; | |
| 15 | + | |
| 16 | + srand(time(NULL)); | |
| 17 | + for (i = 0; i < N; i++) { | |
| 18 | + a[i] = rand() % 1000; | |
| 19 | + } | |
| 20 | + printf("Before sorting:\n"); | |
| 21 | + for (i = 0; i < N; i++) { | |
| 22 | + printf("%d ", a[i]); | |
| 23 | + } | |
| 24 | + printf("\n"); | |
| 25 | + | |
| 26 | + quicksort(a, 0, N - 1); | |
| 27 | + | |
| 28 | + printf("After sorting:\n"); | |
| 29 | + for (i = 0; i < N; i++) { | |
| 30 | + printf("%d ", a[i]); | |
| 31 | + } | |
| 32 | + printf("\n"); | |
| 33 | + | |
| 34 | + return 0; | |
| 35 | +} | |
| 36 | + | |
| 37 | +void quicksort(int a[], int low, int high) { | |
| 38 | + int pivot; | |
| 39 | + | |
| 40 | + if (low < high) { | |
| 41 | + pivot = partition(a, low, high); | |
| 42 | + quicksort(a, low, pivot - 1); | |
| 43 | + quicksort(a, pivot + 1, high); | |
| 44 | + } | |
| 45 | +} | |
| 46 | + | |
| 47 | +int partition(int a[], int low, int high) { | |
| 48 | + int left, right, pivot_item = a[low]; | |
| 49 | + | |
| 50 | + left = low; | |
| 51 | + right = high; | |
| 52 | + | |
| 53 | + while (left < right) { | |
| 54 | + while (a[left] <= pivot_item) { | |
| 55 | + left++; | |
| 56 | + } | |
| 57 | + while (a[right] > pivot_item) { | |
| 58 | + right--; | |
| 59 | + } | |
| 60 | + if (left < right) { | |
| 61 | + int temp = a[left]; | |
| 62 | + a[left] = a[right]; | |
| 63 | + a[right] = temp; | |
| 64 | + } | |
| 65 | + } | |
| 66 | + | |
| 67 | + a[low] = a[right]; | |
| 68 | + a[right] = pivot_item; | |
| 69 | + | |
| 70 | + return right; | |
| 71 | +} |
+11-0samples/quicksort.py
| @@ -0,0 +1,11 @@ | ||
| 1 | +# quicksort algorithm | |
| 2 | +def quicksort(l): | |
| 3 | + if len(l) <= 1: | |
| 4 | + return l | |
| 5 | + pivot = l[len(l) // 2] | |
| 6 | + left = [x for x in l if x < pivot] | |
| 7 | + middle = [x for x in l if x == pivot] | |
| 8 | + right = [x for x in l if x > pivot] | |
| 9 | + return quicksort(left) + middle + quicksort(right) | |
| 10 | + | |
| 11 | +print(quicksort([3,6,8,10,1,2,1])) |
+42-0samples/src/main.rs
| @@ -0,0 +1,42 @@ | ||
| 1 | +// quicksort | |
| 2 | + | |
| 3 | +fn main() { | |
| 4 | + let mut arr = [5, 3, 2, 1, 4]; | |
| 5 | + println!("Before"); | |
| 6 | + println!("{:?}", arr); | |
| 7 | + quicksort(&mut arr); | |
| 8 | + println!("After"); | |
| 9 | + println!("{:?}", arr); | |
| 10 | +} | |
| 11 | + | |
| 12 | +fn quicksort(arr: &mut [i32]) { | |
| 13 | + let len = arr.len(); | |
| 14 | + if len < 2 { | |
| 15 | + return; | |
| 16 | + } | |
| 17 | + let pivot = arr[len / 2]; | |
| 18 | + let mut i = 0; | |
| 19 | + let mut j = len - 1; | |
| 20 | + while i <= j { | |
| 21 | + while arr[i] < pivot { | |
| 22 | + i += 1; | |
| 23 | + } | |
| 24 | + while arr[j] > pivot { | |
| 25 | + j -= 1; | |
| 26 | + } | |
| 27 | + if i <= j { | |
| 28 | + arr.swap(i, j); | |
| 29 | + i += 1; | |
| 30 | + j -= 1; | |
| 31 | + } | |
| 32 | + } | |
| 33 | + if j > 0 { | |
| 34 | + quicksort(&mut arr[0..=j]); | |
| 35 | + } | |
| 36 | + if i < len { | |
| 37 | + quicksort(&mut arr[i..]); | |
| 38 | + } | |
| 39 | +} | |
| 40 | + | |
| 41 | + | |
| 42 | + |
+1-0samples/target/.rustc_info.json
| @@ -0,0 +1 @@ | ||
| 1 | +{"rustc_fingerprint":9465595342035156633,"outputs":{"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.76.0 (07dca489a 2024-02-04)\nbinary: rustc\ncommit-hash: 07dca489ac2d933c78d3c5158e3f43beefeb02ce\ncommit-date: 2024-02-04\nhost: x86_64-unknown-linux-gnu\nrelease: 1.76.0\nLLVM version: 17.0.6\n","stderr":""},"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/huncho/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}} |
+3-0samples/target/CACHEDIR.TAG
| @@ -0,0 +1,3 @@ | ||
| 1 | +Signature: 8a477f597d28d172789f06886806bc55 | |
| 2 | +# This file is a cache directory tag created by cargo. | |
| 3 | +# For information about cache directory tags see https://bford.info/cachedir/ |
+0-0samples/target/debug/.cargo-lock
No content changes (mode or rename only).
+1-0samples/target/debug/.fingerprint/samples-4ad78c505701276c/bin-samples
| @@ -0,0 +1 @@ | ||
| 1 | +c5d0aecdd49b1d2d |
+1-0samples/target/debug/.fingerprint/samples-4ad78c505701276c/bin-samples.json
| @@ -0,0 +1 @@ | ||
| 1 | +{"rustc":18004373081649162931,"features":"[]","declared_features":"","target":15911641458588486097,"profile":11597332650809196192,"path":1684066648322511884,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/samples-4ad78c505701276c/dep-bin-samples"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0} |
+0-0samples/target/debug/.fingerprint/samples-4ad78c505701276c/dep-bin-samples
Binary file changed.
+1-0samples/target/debug/.fingerprint/samples-4ad78c505701276c/invoked.timestamp
| @@ -0,0 +1 @@ | ||
| 1 | +This file has an mtime of when this was started. |
+0-0samples/target/debug/deps/samples-4ad78c505701276c
Binary file changed.
+5-0samples/target/debug/deps/samples-4ad78c505701276c.d
| @@ -0,0 +1,5 @@ | ||
| 1 | +/home/huncho/.config/nvim/samples/target/debug/deps/samples-4ad78c505701276c: src/main.rs | |
| 2 | + | |
| 3 | +/home/huncho/.config/nvim/samples/target/debug/deps/samples-4ad78c505701276c.d: src/main.rs | |
| 4 | + | |
| 5 | +src/main.rs: |
+0-0samples/target/debug/incremental/samples-3uqbhkddw85ac/s-gtrj043y1e-i3bh7v-1y660kxh3g62huq0g87cnmhny/1pwt38kwg2gnurud.o
Binary file changed.
+0-0samples/target/debug/incremental/samples-3uqbhkddw85ac/s-gtrj043y1e-i3bh7v-1y660kxh3g62huq0g87cnmhny/1x683c6zm7ih5fe4.o
Binary file changed.
+0-0samples/target/debug/incremental/samples-3uqbhkddw85ac/s-gtrj043y1e-i3bh7v-1y660kxh3g62huq0g87cnmhny/2jnajux3m10khaf9.o
Binary file changed.
+0-0samples/target/debug/incremental/samples-3uqbhkddw85ac/s-gtrj043y1e-i3bh7v-1y660kxh3g62huq0g87cnmhny/2r18pteymymnuel8.o
Binary file changed.
+0-0samples/target/debug/incremental/samples-3uqbhkddw85ac/s-gtrj043y1e-i3bh7v-1y660kxh3g62huq0g87cnmhny/2wjec3byhv0hjkjw.o
Binary file changed.
+0-0samples/target/debug/incremental/samples-3uqbhkddw85ac/s-gtrj043y1e-i3bh7v-1y660kxh3g62huq0g87cnmhny/30yn7xtofbfxvjjz.o
Binary file changed.
+0-0samples/target/debug/incremental/samples-3uqbhkddw85ac/s-gtrj043y1e-i3bh7v-1y660kxh3g62huq0g87cnmhny/3ppbom7synrekxr5.o
Binary file changed.
+0-0samples/target/debug/incremental/samples-3uqbhkddw85ac/s-gtrj043y1e-i3bh7v-1y660kxh3g62huq0g87cnmhny/4e7s4ov43be067oj.o
Binary file changed.
+0-0samples/target/debug/incremental/samples-3uqbhkddw85ac/s-gtrj043y1e-i3bh7v-1y660kxh3g62huq0g87cnmhny/4mkmpf2uxwdw8j0z.o
Binary file changed.
+0-0samples/target/debug/incremental/samples-3uqbhkddw85ac/s-gtrj043y1e-i3bh7v-1y660kxh3g62huq0g87cnmhny/4wihuiwtydji76p1.o
Binary file changed.
+0-0samples/target/debug/incremental/samples-3uqbhkddw85ac/s-gtrj043y1e-i3bh7v-1y660kxh3g62huq0g87cnmhny/53s2vyivqiqjco82.o
Binary file changed.
+0-0samples/target/debug/incremental/samples-3uqbhkddw85ac/s-gtrj043y1e-i3bh7v-1y660kxh3g62huq0g87cnmhny/5cg3fzdizo3luxs3.o
Binary file changed.
+0-0samples/target/debug/incremental/samples-3uqbhkddw85ac/s-gtrj043y1e-i3bh7v-1y660kxh3g62huq0g87cnmhny/dep-graph.bin
Binary file changed.
+0-0samples/target/debug/incremental/samples-3uqbhkddw85ac/s-gtrj043y1e-i3bh7v-1y660kxh3g62huq0g87cnmhny/dntrjhq3w42l1nl.o
Binary file changed.
+0-0samples/target/debug/incremental/samples-3uqbhkddw85ac/s-gtrj043y1e-i3bh7v-1y660kxh3g62huq0g87cnmhny/hc24am63hkgr6dl.o
Binary file changed.
+0-0samples/target/debug/incremental/samples-3uqbhkddw85ac/s-gtrj043y1e-i3bh7v-1y660kxh3g62huq0g87cnmhny/query-cache.bin
Binary file changed.
+0-0samples/target/debug/incremental/samples-3uqbhkddw85ac/s-gtrj043y1e-i3bh7v-1y660kxh3g62huq0g87cnmhny/work-products.bin
Binary file changed.
+0-0samples/target/debug/incremental/samples-3uqbhkddw85ac/s-gtrj043y1e-i3bh7v.lock
No content changes (mode or rename only).
+0-0samples/target/debug/samples
Binary file changed.
+1-0samples/target/debug/samples.d
| @@ -0,0 +1 @@ | ||
| 1 | +/home/huncho/.config/nvim/samples/target/debug/samples: /home/huncho/.config/nvim/samples/src/main.rs |