1
0
Fork 0

nvim: update config

This commit is contained in:
Daniel Kempkens 2024-08-01 22:51:42 +02:00
parent 744b41c1a0
commit ff47bd82b0
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
3 changed files with 10 additions and 8 deletions

View file

@ -6,8 +6,7 @@
(let [maybe-tabnine (if (pcall require :cmp_tabnine.config) (let [maybe-tabnine (if (pcall require :cmp_tabnine.config)
[{:name :cmp_tabnine}] [{:name :cmp_tabnine}]
[])] [])]
(vim.list_extend (vim.list_extend [{:name :nvim_lsp} {:name :otter}] (vim.list_extend (vim.list_extend [{:name :nvim_lsp}] maybe-tabnine)
maybe-tabnine)
[{:name :async_path} {:name :luasnip}]))) [{:name :async_path} {:name :luasnip}])))
(fn comparator-list [] (fn comparator-list []
@ -82,7 +81,6 @@
kind (kind-fn entry vim-item) kind (kind-fn entry vim-item)
strings (vim.split kind.kind "%s" strings (vim.split kind.kind "%s"
{:trimempty true})] {:trimempty true})]
;(set kind.dup 0)
(if (= entry.source.name :cmp_tabnine) (if (= entry.source.name :cmp_tabnine)
(do (do
(set kind.kind " 󱜚 ") (set kind.kind " 󱜚 ")
@ -103,8 +101,7 @@
(set kind.menu (set kind.menu
(.. " (" (.. " ("
(or (. strings 2) "") ")")))) (or (. strings 2) "") ")"))))
kind))} kind))}})
:experimental {:ghost_text true}})
(cmp.setup.cmdline "/" (cmp.setup.cmdline "/"
{:sources (cmp.config.sources [{:name :nvim_lsp_document_symbol}] {:sources (cmp.config.sources [{:name :nvim_lsp_document_symbol}]
[{:name :buffer}]) [{:name :buffer}])

View file

@ -10,9 +10,12 @@
:*.js :*.js
:*.jsx :*.jsx
:*.kt :*.kt
:*.lua
:*.php :*.php
:*.py :*.py
:*.rb :*.rb
:*.ts :*.ts
:*.tsx] :*.tsx
:*.yaml
:*.yml]
:group augroup})) :group augroup}))

View file

@ -1,5 +1,7 @@
(let [diffview (require :diffview)] (let [diffview (require :diffview)
actions (require :diffview.actions)]
(diffview.setup {:hooks {:diff_buf_read (fn [_bufnr] (diffview.setup {:hooks {:diff_buf_read (fn [_bufnr]
(set vim.opt_local.relativenumber (set vim.opt_local.relativenumber
false) false)
(set vim.b.toggle_line_style 0))}})) (set vim.b.toggle_line_style 0))
:view_opened #(actions.toggle_files)}}))