Commit graph

96 commits

Author SHA1 Message Date
Daniel Siepmann bdbaaba2fd
Remove Neovim cmp autocomplete
I found it to disturbing and prefer the native behaviour I am used to.
2022-04-12 16:44:03 +02:00
Daniel Siepmann f4cdf96abe
Added typescript syntax for Neovim 2022-03-31 15:15:52 +02:00
Daniel Siepmann 32df656e75
Add statix for nix checking into Neovim 2022-03-30 15:49:54 +02:00
Daniel Siepmann 2cd771c838
Use less as general pager
I tried nvimpager but it was a bit complex for me to re use existing
Neovim settings tweak for specific usage as pager.
I decided to stick with less for everything.
2022-03-29 15:29:10 +02:00
Daniel Siepmann 3b3f2d0588
Integrate gitlint via ale into Neovim for writing commit message
This is only done for one customer yet, as this customer has clean rules
which are already provided as community rules via gitlint.
2022-03-29 11:52:32 +02:00
Daniel Siepmann cbe783115c
Update todo comments 2022-03-23 17:42:04 +01:00
Daniel Siepmann f0323720e7
Update typoscript syntax plugin for Neovim 2022-03-23 17:41:47 +01:00
Daniel Siepmann 126b0fa422
Add new plugin to Neovim for easier merges
I'll give it a try and check how well it works.
2022-03-23 17:28:36 +01:00
Daniel Siepmann b97c6b363b
Enable Neovim cmp lsp support
It just works now, I probably have changed something to make that happen
but don't know what exactly.
2022-03-23 07:41:26 +01:00
Daniel Siepmann e8270eeda3
Always use php 7.4 for phpactor
I already used 7.4 for language server integration.
2022-03-22 14:39:04 +01:00
Daniel Siepmann cb7d380e0b
Add Neovim cmp autocompletion
Finally a fast none disturbing auto completion.
lsp_signature_nvim is kept as it provides info while filling in
arguments.
cmp lsp didn't work in my case, so didn't add it.
2022-03-22 13:31:26 +01:00
Daniel Siepmann a652394ba4
Use PHP 7.4 for phpactor
As 8.0 triggers some notices.
2022-03-22 13:31:25 +01:00
Daniel Siepmann e64f6b8030
Migrate whole Neovim configuration into expected structure
That way I can load my whole configuration as a plugin.
I no longer need to explicitly set any configuration via nix as init.vim
or such things.
2022-03-22 09:38:34 +01:00
Daniel Siepmann 6884adfa9d
Remove language server written in nodejs
Due to high risk of insecure dependencies, even dependencies vanishing
file system.
2022-03-22 09:18:59 +01:00
Daniel Siepmann 1b2e8a969a
Remove Neovim dadbod database integration
Autocompletion is way behind mycli / litecli. And that's more important
to me. So do not keep the plugins. Keep existing workflow instead.
2022-03-22 07:47:28 +01:00
Daniel Siepmann a527da50ac
Add Neovim dadbod-* plugins
Not sure if I'll settle on that. I'm currently used to mycli and
litecli.
But sounds useful to have it within the editor to not have different
programs with different configuration and behaviour.
2022-03-21 16:01:01 +01:00
Daniel Siepmann 5fb8c7f0c0
Use buildVimPluginFrom2Nix as outer most public API 2022-03-17 11:53:49 +01:00
Daniel Siepmann d7f83654e8
Add Neovim LSP for Yaml files 2022-03-17 09:01:15 +01:00
Daniel Siepmann 2dae9f5813
Update neovim plugin todo after reviewing all nixpkgs vim plugins
Also read some other sites
2022-03-17 08:04:13 +01:00
Daniel Siepmann 8448e85bb1
Add xmllint via ale to neovim
Maintain all dependencies via nix / home-manager.
Load xsd schema file.
Define nix xmllint for linting.
2022-03-16 17:12:48 +01:00
Daniel Siepmann 565540611b
Add vim language server 2022-03-16 16:54:23 +01:00
Daniel Siepmann 42f9578ef6
Use nix php when starting phpactor language server 2022-03-16 16:53:46 +01:00
Daniel Siepmann ab062b61d4
No need to learn lua yet 2022-03-16 16:53:12 +01:00
Daniel Siepmann c8b487c3fd
Remove todo Neovim plugin telescope can already do this 2022-03-16 16:03:31 +01:00
Daniel Siepmann e653973ab5
Remove todo neovim plugin trouble
telescope can already show them
2022-03-16 15:15:47 +01:00
Daniel Siepmann 9d4f19af6f
Remove already done todo 2022-03-16 15:15:31 +01:00
Daniel Siepmann 40cef5b623
Add LSP basics (PHP)
Add for PHP via existing phpactor as server.
Use new signature plugin for proper none irritating inline help during
function calls.

TODO: Get rid of preview window showing up …
2022-03-16 14:46:12 +01:00
Daniel Siepmann a842f100b0
Add todos for lua programming language 2022-03-16 14:45:36 +01:00
Daniel Siepmann 0d4f5463d1
Migrate Leaderf to Telescope
Written in Lua.
Very flexible.
Clean documentation.
Easy to extend and configure.
Can do everything I wanted with a good feeling.
2022-03-16 14:44:49 +01:00
Daniel Siepmann 1991be3686
Remove todo for fzf as I'm now switched to leaderf 2022-03-16 10:17:44 +01:00
Daniel Siepmann 51cb2c9ad3
Migrate Neovim CtrlP to FinderF
Way faster and matches my own preferences. Has a preview and pop up in
the center of the screen.
Comes with many other modes like colorscheme, help, line, etc.
diff --git a/home/programs/neovim.nix b/home/programs/neovim.nix
index 55783de..dda525c 100644
--- a/home/programs/neovim.nix
+++ b/home/programs/neovim.nix
@@ -239,8 +239,8 @@ in {
     }

     {
-      plugin = ctrlp-vim;
-      config = pkgs.lib.fileContents ./neovim/plugins/ctrlp.vim;
+      plugin = LeaderF;
+      config = pkgs.lib.fileContents ./neovim/plugins/leaderf.vim;
     }

     # Syntax
diff --git a/home/programs/neovim/config/functions.vim b/home/programs/neovim/config/functions.vim
index 24e0c00..fea577b 100644
--- a/home/programs/neovim/config/functions.vim
+++ b/home/programs/neovim/config/functions.vim
@@ -113,7 +113,7 @@ function! StartProfiling()
     execute(':profile file *')
 endfunc

-function! CtrlPCurrentComposerPackage()
+function! LeaderfCurrentComposerPackage()
     let l:filePath = split(expand('%:p:h'), '/')

     while !filereadable('/' . join(l:filePath + ['composer.json'], '/')) && len(l:filePath)
@@ -121,7 +121,7 @@ function! CtrlPCurrentComposerPackage()
     endwhile

     if len(l:filePath)
-        execute(':CtrlP /' . join(l:filePath, '/'))
+        execute(':LeaderfFile /' . join(l:filePath, '/'))
     else
         echom 'No composer package detected.'
     endif
diff --git a/home/programs/neovim/config/mappings.vim b/home/programs/neovim/config/mappings.vim
index bd3aee9..7b7ad7d 100644
--- a/home/programs/neovim/config/mappings.vim
+++ b/home/programs/neovim/config/mappings.vim
@@ -10,10 +10,11 @@ nnoremap <leader>v :set paste!<cr>
 nnoremap <leader>nh :nohlsearch<cr>

 " Configure navigation, e.g. go to buffer, file, ...
-nnoremap <leader>p :CtrlP<cr>
-nnoremap <leader>l :CtrlPBuffer<cr>
-nnoremap <leader>r :CtrlPBufTag<cr>
-nnoremap <silent> <leader>c :call CtrlPCurrentComposerPackage()<cr>
+nnoremap <leader>pp :LeaderfSelf<cr>
+nnoremap <leader>pf :LeaderfFile<cr>
+nnoremap <leader>pb :LeaderfBuffer<cr>
+nnoremap <leader>pt :LeaderfBufTag<cr>
+nnoremap <silent> <leader>pc :call LeaderfCurrentComposerPackage()<cr>

 nnoremap <leader>k :NERDTreeToggle<cr>
 nnoremap <leader>f :NERDTreeFind<cr>
diff --git a/home/programs/neovim/plugins/ctrlp.vim b/home/programs/neovim/plugins/ctrlp.vim
deleted file mode 100644
index c45b87e..0000000
--- a/home/programs/neovim/plugins/ctrlp.vim
+++ /dev/null
@@ -1,26 +0,0 @@
-let g:ctrlp_follow_symlinks = 2
-" Default to regex mode
-let g:ctrlp_regexp = 1
-let g:ctrlp_match_window = 'top,order:ttb,min:1,max:10'
-" let g:ctrlp_open_new_file = '0'
-" let g:ctrlp_lazy_update = 1
-let g:ctrlp_show_hidden = 1
-
-let g:ctrlp_types = ['fil', 'buf', 'buftag']
-
-let g:ctrlp_working_path_mode = 'w'
-let g:ctrlp_max_files = 0
-let g:ctrlp_clear_cache_on_exit = 0
-
-" Configure completion for tags in buffer,
-" e.g. configure which kinds to complete for css.
-let g:ctrlp_buftag_types = {
-  \ 'css' : '--css-types=vcit',
-  \ 'typescript' : '--typescript-types=cnfvmitesod',
-  \ 'xml' : '--xml-types=ci',
-  \ 'rst' : '--reStructuredText-types=csSt',
-  \ 'markdown' : '--Markdown-types=csStT',
-  \ 'fluid' : '--xml-types=si',
-  \ 'apache' : '--apache-types=s',
-  \ 'yaml' : '--yaml-types=t',
-\ }
diff --git a/home/programs/neovim/plugins/leaderf.vim b/home/programs/neovim/plugins/leaderf.vim
new file mode 100644
index 0000000..7627b07
--- /dev/null
+++ b/home/programs/neovim/plugins/leaderf.vim
@@ -0,0 +1,213 @@
+let g:Lf_WorkingDirectoryMode = 'c'
+
+let g:Lf_FollowLinks = 1
+let g:Lf_ShowHidden = 1
+
+let g:Lf_WindowPosition = 'popup'
+let g:Lf_HideHelp = 1
+
+let g:Lf_GtagsAutoUpdate = 0
+
+let g:Lf_IgnoreCurrentBufferName = 1
+
+let g:Lf_ShowDevIcons = 0
+
+" TODO: Try to port to existing colorscheme, does it work with load order?
+let g:Lf_PopupPalette = {
+    \  'dark': {
+    \   'Lf_hl_popup_inputText': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'blue',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_window': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_blank': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_cursor': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_prompt': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_spin': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_normalMode': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_inputMode': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_category': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_nameOnlyMode': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_fullPathMode': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_fuzzyMode': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_regexMode': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_cwd': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_lineInfo': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_popup_total': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_cursorline': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': '235',
+    \   },
+    \   'Lf_hl_selection': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_match0': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'blue',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_match1': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'blue',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_match2': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'blue',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_match3': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'blue',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_match4': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'blue',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_match': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'blue',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_lineLocation': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_previewTitle': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_winNumber': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_winIndicators': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_winModified': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_winNomodifiable': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_winDirname': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_quickfixFileName': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_quickfixLineNumber': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_quickfixColumnNumber': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_loclistFileName': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_loclistLineNumber': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \   'Lf_hl_loclistColumnNumber': {
+    \       'cterm': 'none',
+    \       'ctermfg': 'none',
+    \       'ctermbg': 'none',
+    \   },
+    \  }
+    \ }
+
+let g:Lf_PreviewInPopup = 1
+let g:Lf_PreviewHorizontalPosition = 'center'
+let g:Lf_PreviewCode = 0
+let g:Lf_PreviewResult = {
+    \ 'File': 1,
+    \ 'Buffer': 1,
+    \ 'BufTag': 1,
+    \}
2022-03-16 09:05:13 +01:00
Daniel Siepmann 3bf0d66f3b
Add inline todos with new plugins and programs to try 2022-03-16 09:04:03 +01:00
Daniel Siepmann 47c3440be6
Add Neovim syntax of i3 config 2022-03-16 09:03:51 +01:00
Daniel Siepmann 271758a453
Update Neovim colorscheme 2022-03-16 09:03:19 +01:00
Daniel Siepmann 551153f446
Do note use paratest in Neovim plugin vim-test
Remove the paratest detection.
I consider paratest only for CI and executing a huge set of tests.
But I use vim-test only to execute a single test file or single test.
2022-03-15 17:29:34 +01:00
Daniel Siepmann 4b825bf453
Add Neovim syntax mustache
Customer sac is using handlebars template which have same syntax.
2022-03-15 09:08:32 +01:00
Daniel Siepmann 82e29fb63e
Add some comments to neovim setup 2022-03-15 08:41:41 +01:00
Daniel Siepmann 9e5a77f592
Migrate Neovim snippets to inline configuration
Same as with configuration.
No need for extra repository.
2022-03-15 08:16:18 +01:00
Daniel Siepmann 8541b19663
Adjust neovim configuration for sac customer 2022-03-15 08:01:46 +01:00
Daniel Siepmann 7106b7cac7
Add neovim configuration inline instead of another repository
This eases maintenance as I don't need to commit and push one repo, and
update rev and sha in here.
Instead I can just change configuration and run home-manager switch.
2022-03-15 08:00:46 +01:00
Daniel Siepmann bbaa8830c3
Remove custom grepping from neovim
I'm using plugin ag already.
2022-03-14 16:33:59 +01:00
Daniel Siepmann a683442f90
Remove neovim plugin syntastic
I'm using ale for such a long time already …
2022-03-14 16:31:57 +01:00
Daniel Siepmann e59fc32ff0
Import pkgs.vimPlugins to shorten plugin definitions 2022-03-14 10:43:50 +01:00
Daniel Siepmann 5a72a2a648
Allow vim sqlformat to work
Add necessary python package which is used by the plugin.
2022-03-14 10:43:26 +01:00
Daniel Siepmann 98f4e5c3bb
Adjust vim plugin snipMate snippet_version
Keep old version 0, as no snippet was migrated yet.
Need to migrate them prior usage of version 1.
2022-03-14 09:46:26 +01:00
Daniel Siepmann 082ad58af1
Migrate neovim setup
I managed my setup manually.
This commit ports the existing setup to home-manager.

The program module is used to install neovim together with plugins.
Custom plugins are now maintained at Gitea / GitHub and loaded via nix as well.
2022-03-12 11:26:32 +01:00