mirror of
https://github.com/danbee/dotfiles-local
synced 2025-03-04 08:49:07 +00:00
Setup autocompletion for LSPs
This commit is contained in:
parent
787526a9c4
commit
574eb3d8f6
@ -1,4 +1,9 @@
|
||||
{
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "8fcc934a52af96120fe26358985c10c035984b53" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" },
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "1a8ba635e511148801b55a1128aef933c296a301" },
|
||||
"kanagawa.nvim": { "branch": "master", "commit": "5c4037432f0ae2d0b75d3a7b7cfa3022d7054e4d" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "57cce98dfdb2f2dd05a0567d89811e6d0505e13b" },
|
||||
@ -6,6 +11,8 @@
|
||||
"neo-tree.nvim": { "branch": "v2.x", "commit": "2b2f74828eeb02cf29d6b21aa32eedadadc94ca7" },
|
||||
"nordic.nvim": { "branch": "main", "commit": "fc7ea160bb441f9c0245c2719a3c7b8c22468178" },
|
||||
"nui.nvim": { "branch": "main", "commit": "1f43b13d133eb4b4f53a4485379d9afa58808389" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "777450fd0ae289463a14481673e26246b5e38bf2" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "7d5af779acbc8a6ff9dfd7f2d39ae898fb67480f" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "411e771d511442ab81670701f5c830f6c74aadd7" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "b55fe6175f0001347a433c9df358c8cbf8a4e90f" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "0568104bf8d0c3ab16395433fcc5c1638efc25d4" },
|
||||
@ -13,5 +20,6 @@
|
||||
"plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "942fe5faef47b21241e970551eba407bc10d9547" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "1b0c88094548a62641ece1e668fa9a234e1c539e" },
|
||||
"vim-vsnip": { "branch": "master", "commit": "7753ba9c10429c29d25abfd11b4c60b76718c438" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "4b73390eec680b4c061ea175eb32c0ff3412271d" }
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
require('onedark').load()
|
||||
require("onedark").load()
|
||||
|
||||
local indent = 2
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
require('lspconfig').elixirls.setup({})
|
||||
require("lspconfig").elixirls.setup({})
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
require('config.plugins.lspconfig.elixir')
|
||||
require('config.plugins.lspconfig.emmet')
|
||||
require('config.plugins.lspconfig.javascript')
|
||||
require('config.plugins.lspconfig.lua')
|
||||
require('config.plugins.lspconfig.ruby')
|
||||
require("config.plugins.lspconfig.elixir")
|
||||
require("config.plugins.lspconfig.emmet")
|
||||
require("config.plugins.lspconfig.javascript")
|
||||
require("config.plugins.lspconfig.lua")
|
||||
require("config.plugins.lspconfig.ruby")
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
require('lspconfig').lua_ls.setup {
|
||||
require("lspconfig").lua_ls.setup {
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
version = 'LuaJIT',
|
||||
version = "LuaJIT",
|
||||
},
|
||||
diagnostics = {
|
||||
globals = {'vim'},
|
||||
globals = {"vim"},
|
||||
},
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
|
||||
@ -1 +1 @@
|
||||
require('lspconfig').ruby_ls.setup({})
|
||||
require("lspconfig").ruby_ls.setup({})
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
return function()
|
||||
require('lualine').setup()
|
||||
require("lualine").setup()
|
||||
end
|
||||
|
||||
28
config/nvim/lua/config/plugins/nvim-cmp.lua
Normal file
28
config/nvim/lua/config/plugins/nvim-cmp.lua
Normal file
@ -0,0 +1,28 @@
|
||||
return function()
|
||||
local cmp = require("cmp")
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
-- completion = cmp.config.window.bordered(),
|
||||
-- documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "vsnip" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
})
|
||||
})
|
||||
end
|
||||
@ -1,2 +1,8 @@
|
||||
return {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"hrsh7th/cmp-vsnip",
|
||||
"hrsh7th/vim-vsnip",
|
||||
}
|
||||
|
||||
@ -2,6 +2,6 @@ return {
|
||||
"neovim/nvim-lspconfig",
|
||||
|
||||
config = function()
|
||||
require('config.plugins.lspconfig')
|
||||
require("config.plugins.lspconfig")
|
||||
end
|
||||
}
|
||||
|
||||
5
config/nvim/lua/plugins/nvim-cmp.lua
Normal file
5
config/nvim/lua/plugins/nvim-cmp.lua
Normal file
@ -0,0 +1,5 @@
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
|
||||
config = require("config.plugins.nvim-cmp")
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user