neovim 0.11
This commit is contained in:
parent
3ec79a04d6
commit
c551043634
17 changed files with 62 additions and 98 deletions
|
@ -27,6 +27,6 @@ require("lazy").setup({
|
|||
-- import your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
install = { colorscheme = { "pywal16" } },
|
||||
checker = { enabled = true },
|
||||
install = { colorscheme = { "tokyonight" } },
|
||||
checker = { enabled = false },
|
||||
})
|
||||
|
|
13
lua/config/lsp.lua
Normal file
13
lua/config/lsp.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
local capabilities = {
|
||||
textDocument = {
|
||||
foldingRange = {
|
||||
dynamicRegistration = false,
|
||||
lineFoldingOnly = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
capabilities = require("blink.cmp").get_lsp_capabilities(capabilities)
|
||||
|
||||
-- Load all LSP's in "lsp/"
|
||||
vim.lsp.enable({ "clangd", "tinymist", "lua-language-server", })
|
|
@ -13,6 +13,7 @@ map("n", "<C-b>", "<cmd>Neotree toggle<CR>", { desc = "Open neotree"})
|
|||
map("n", "<C-p>", "<cmd>Telescope find_files<CR>", { desc = "Telescope: Find files" })
|
||||
map("n", "<C-g>", "<cmd>Telescope live_grep<CR>", { desc = "Telescope: Live grep" })
|
||||
|
||||
-- LSP Stuff
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
||||
callback = function(ev)
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
local cmp = require'cmp'
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
||||
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 }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
}),
|
||||
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' }, -- For luasnip users.
|
||||
{ name = 'nvim_lua' },
|
||||
-- { name = 'buffer' },
|
||||
{ name = 'path' },
|
||||
{ name = 'nvim_lsp_signature_help' },
|
||||
-- { name = 'cmdline' },
|
||||
})
|
||||
})
|
|
@ -16,6 +16,7 @@ o.tabstop = 2
|
|||
o.softtabstop = 2
|
||||
|
||||
o.number = true
|
||||
o.relativenumber = true
|
||||
o.syntax = "on"
|
||||
o.cursorline = true
|
||||
o.expandtab = true
|
||||
|
|
|
@ -7,11 +7,5 @@ return {
|
|||
disable_filetype = { "TelescopePrompt", "vim" },
|
||||
map_cr = true,
|
||||
},
|
||||
config = function(opts)
|
||||
require("nvim-autopairs").setup(opts)
|
||||
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
|
||||
local cmp = require('cmp')
|
||||
require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||
end
|
||||
}
|
||||
}
|
||||
|
|
23
lua/plugins/blink.lua
Normal file
23
lua/plugins/blink.lua
Normal file
|
@ -0,0 +1,23 @@
|
|||
return {
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
dependencies = {
|
||||
"L3MON4D3/LuaSnip"
|
||||
},
|
||||
version = "1.*",
|
||||
---@module "blink.cmp"
|
||||
---@type blink.cmp.Config
|
||||
opts = {
|
||||
keymap = { preset = "super-tab" },
|
||||
appearance = {
|
||||
nerd_font_variant = "mono"
|
||||
},
|
||||
completion = { documentation = { auto_show = false } },
|
||||
sources = {
|
||||
default = { "lsp", "path", "snippets", "buffer" },
|
||||
},
|
||||
fuzzy = { implementation = "prefer_rust_with_warning" }
|
||||
},
|
||||
opts_extend = { "sources.default" }
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
{ "hrsh7th/cmp-nvim-lua" },
|
||||
{ "hrsh7th/cmp-nvim-lsp-signature-help" },
|
||||
{ "hrsh7th/cmp-cmdline" },
|
||||
{ "hrsh7th/cmp-path" },
|
||||
{ "hrsh7th/cmp-buffer" },
|
||||
},
|
||||
opts = function()
|
||||
require "config.plugins.cmp"
|
||||
end,
|
||||
},
|
||||
{
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
dependencies = {},
|
||||
config = function()
|
||||
local lspconfig = require('lspconfig')
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
dependencies = {
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"rafamadriz/friendly-snippets"
|
||||
},
|
||||
opts = {}
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies= {},
|
||||
config = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
end,
|
||||
},
|
||||
}
|
|
@ -14,9 +14,11 @@ return {
|
|||
{
|
||||
"mason-org/mason-lspconfig.nvim",
|
||||
dependencies = {
|
||||
"mason-org/mason.nvim",
|
||||
"neovim/nvim-lspconfig",
|
||||
},
|
||||
opts = {
|
||||
ensure_installed = { "lua_ls" },
|
||||
automatic_enable = true
|
||||
},
|
||||
},
|
||||
|
|
|
@ -7,7 +7,7 @@ return {
|
|||
dependencies = {},
|
||||
opts = {
|
||||
auto_install = true,
|
||||
ensure_installed = { "lua" },
|
||||
ensure_installed = { "lua", "c", "vimdoc" },
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true }
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ return {
|
|||
opts = {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'pywal16-nvim',
|
||||
theme = 'tokyonight',
|
||||
component_separators = { left = "|", right = "|" },
|
||||
section_separators = { left = "", right = "" },
|
||||
},
|
||||
|
@ -24,7 +24,7 @@ return {
|
|||
mode = "buffers",
|
||||
diagnostics = "nvim_lsp",
|
||||
offsets = {
|
||||
{
|
||||
{
|
||||
filetype = "neo-tree", text = "File Explorer",
|
||||
text_align = "center", separator = true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue