mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2025-01-07 07:47:35 +00:00
nvim: Add better support for lsp via omnifunc
Only reason I'm not using this is that there is no floating preview window
This commit is contained in:
parent
6baa4feab0
commit
48af6cc3ef
@ -1,5 +1,6 @@
|
||||
local o = vim.o
|
||||
local g = vim.g
|
||||
local utils = require("utils")
|
||||
|
||||
-- Set leader to space
|
||||
g.mapleader = " "
|
||||
@ -19,5 +20,11 @@ o.scrolloff = 3
|
||||
-- o.mousehide = true
|
||||
o.mouse = "a"
|
||||
|
||||
-- Autocomplete options
|
||||
o.completeopt = "menuone,noinsert,noselect,preview"
|
||||
utils.augroup("close_preview", function()
|
||||
vim.cmd("autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif")
|
||||
end)
|
||||
|
||||
local has = vim.fn.has
|
||||
g.is_mac = (has("mac") or has("macunix") or has("gui_macvim") or vim.fn.system("uname"):find("^darwin") ~= nil)
|
||||
|
@ -1,6 +1,10 @@
|
||||
-- luacheck: globals packer_plugins
|
||||
local utils = require("utils")
|
||||
|
||||
local function default_attach(client, bufnr)
|
||||
require('completion').on_attach()
|
||||
if utils.is_plugin_loaded("completion-nvim") then
|
||||
require('completion').on_attach()
|
||||
end
|
||||
|
||||
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
|
||||
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
|
||||
|
Loading…
Reference in New Issue
Block a user