summaryrefslogtreecommitdiff
path: root/vim-extra/.config
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2023-09-22 22:16:55 +0200
committerJulian T <julian@jtle.dk>2023-09-23 12:17:43 +0200
commit0e9840e0b734217ff5e5621a1e27553ebabc43fb (patch)
treeebf42aae8bbde018f75cc7186b6913ae0f82de15 /vim-extra/.config
parent85080ac87cc5bc535308147f973e4e73a77c2a4e (diff)
Dwm and other window managers
Diffstat (limited to 'vim-extra/.config')
-rw-r--r--vim-extra/.config/nvim/extra.vim22
1 files changed, 9 insertions, 13 deletions
diff --git a/vim-extra/.config/nvim/extra.vim b/vim-extra/.config/nvim/extra.vim
index 104b041..415444f 100644
--- a/vim-extra/.config/nvim/extra.vim
+++ b/vim-extra/.config/nvim/extra.vim
@@ -32,19 +32,15 @@
colorscheme PaperColor
lua << EOF
- local on_attach = function(client, bufnr)
- vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
- local bufopts = { noremap=true, silent=true, buffer=bufnr }
- vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
- end
-
- require('lspconfig')['rust_analyzer'].setup{
- on_attach = on_attach,
- settings = {
- ["rust-analyzer"] = {}
- }
- }
-
+ local lspconfig = require("lspconfig")
+ lspconfig.clangd.setup {}
+
+ vim.api.nvim_create_autocmd("LspAttach", {
+ group = vim.api.nvim_create_augroup("UserLspConfig", {}),
+ callback = function (ev)
+ vim.bo[ev.buf].omnifunc = "v:lua.vim.lsp.omnifunc"
+ end,
+ })
EOF
"}}}