MacOS Nix
Asahi is just not perfectly usable yet. Moved stuff, went nix.
This commit is contained in:
1 parent
9d2c3f898a
commit
a568a964fd
80 files changed
+260
-1516
No files matched your search
@@ -0,0 +1,99 @@
|
||||
return {
|
||||
'hrsh7th/nvim-cmp',
|
||||
dependencies = {
|
||||
'neovim/nvim-lspconfig',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-path',
|
||||
'lukas-reineke/cmp-rg',
|
||||
'onsails/lspkind.nvim'
|
||||
},
|
||||
config = function()
|
||||
local cmp = require('cmp')
|
||||
local lspkind = require('lspkind')
|
||||
cmp.setup({
|
||||
-- preselect = cmp.PreselectMode.None,
|
||||
completion = {
|
||||
completeopt = "menu,menuone,noinsert",
|
||||
callSnippet = "Replace",
|
||||
keywordSnippet = "Replace",
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered({}),
|
||||
documentation = cmp.config.window.bordered({}),
|
||||
},
|
||||
snippet = {
|
||||
expand = function(arg)
|
||||
vim.snippet.expand(arg.body)
|
||||
end
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<Tab>'] = cmp.mapping.confirm({ select = true }),
|
||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
['<C-g>'] = cmp.mapping.abort(),
|
||||
}),
|
||||
sources = cmp.config.sources(
|
||||
{
|
||||
{ name = 'nvim_lsp' },
|
||||
},
|
||||
{
|
||||
{ name = 'path' },
|
||||
}
|
||||
-- {
|
||||
-- { name = 'buffer' },
|
||||
-- { name = 'rg', keyword_length = 3 }
|
||||
-- }
|
||||
),
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
mode = 'symbol'
|
||||
})
|
||||
},
|
||||
-- view = {
|
||||
-- entries = 'native'
|
||||
-- },
|
||||
})
|
||||
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
vim.lsp.config('lua_ls', {
|
||||
-- cmd = { '/home/venomade/.local/share/lua-language-server/bin/lua-language-server' },
|
||||
capabilities = capabilities,
|
||||
root_markers = {
|
||||
".luarc.json",
|
||||
".luarc.jsonc",
|
||||
".git",
|
||||
},
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = 'Lua 5.4',
|
||||
path = vim.list_extend(
|
||||
vim.split(package.path, ';'),
|
||||
{
|
||||
'?.lua',
|
||||
'?/init.lua',
|
||||
'./stubs/?.lua',
|
||||
'./stubs/?/init.lua'
|
||||
}),
|
||||
},
|
||||
workspace = {
|
||||
library = {
|
||||
vim.env.HOME .. '/.luarocks/share/lua/5.4',
|
||||
'./stubs'
|
||||
},
|
||||
},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.enable('lua_ls')
|
||||
vim.lsp.config('clangd', {
|
||||
capabilities = capabilities
|
||||
})
|
||||
vim.lsp.enable('clangd')
|
||||
end
|
||||
}
|
||||
Reference in new issue
Block a user