mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 11:24:55 +02:00
nvim
This commit is contained in:
parent
35c3cc49d5
commit
08bf9aad64
14 changed files with 264 additions and 110 deletions
|
|
@ -161,7 +161,7 @@ return {
|
|||
local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1]
|
||||
range = {
|
||||
start = { args.line1, 0 },
|
||||
---@diagnostic disable-next-line: undefined-field
|
||||
---@diagnostic disable-next-line: undefined-field
|
||||
["end"] = { args.line2, end_line:len() },
|
||||
}
|
||||
end
|
||||
|
|
@ -177,20 +177,28 @@ return {
|
|||
opts = require("config.oil"),
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
config = function(_, opts)
|
||||
require('oil').setup(opts)
|
||||
require("oil").setup(opts)
|
||||
|
||||
-- Don't touch my CWD!
|
||||
require('utils.oil').RegisterCWDHackHook()
|
||||
-- Don't touch my CWD!
|
||||
require("utils.oil").RegisterCWDHackHook()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
keys = keys.trouble or {},
|
||||
opts = {},
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
dependencies = {
|
||||
{
|
||||
"rafamadriz/friendly-snippets",
|
||||
config = function()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
end,
|
||||
},
|
||||
},
|
||||
opts = {},
|
||||
config = function(_, opts)
|
||||
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/snippets" })
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ return {
|
|||
"hrsh7th/cmp-buffer", -- autocomplete from buffer
|
||||
"hrsh7th/cmp-path", -- autocomplete from filesystem
|
||||
"hrsh7th/cmp-nvim-lsp", -- autocomplete from lsp
|
||||
-- "saadparwaiz1/cmp_luasnip", -- autocomplete from snippet engine
|
||||
-- "L3MON4D3/LuaSnip", -- snippet engine
|
||||
"saadparwaiz1/cmp_luasnip", -- autocomplete from snippet engine
|
||||
"L3MON4D3/LuaSnip", -- snippet engine
|
||||
"onsails/lspkind-nvim", -- icons for kind
|
||||
},
|
||||
opts = require("config.cmp"),
|
||||
|
|
@ -39,6 +39,7 @@ return {
|
|||
local lsp_zero = require("lsp-zero")
|
||||
local lsp_config = require("lspconfig")
|
||||
local augroup = vim.api.nvim_create_augroup("Lsp", {})
|
||||
local utils = require("utils.lsp")
|
||||
local map = require("utils.keys")
|
||||
|
||||
lsp_zero.on_attach(function(_, bufnr)
|
||||
|
|
@ -60,8 +61,12 @@ return {
|
|||
})
|
||||
end
|
||||
|
||||
if (opts.document_hightlight or server_opt.document_highlight or false) and client.supports_method('textDocument/documentHighlight')then
|
||||
require("utils.lsp").document_highlight(bufnr)
|
||||
if client.supports_method('textDocument/hover') then
|
||||
--utils.signature_help_on_hover(bufnr)
|
||||
end
|
||||
|
||||
if (opts.document_hightlight or server_opt.document_highlight or false) and client.supports_method('textDocument/documentHighlight') then
|
||||
utils.document_highlight(bufnr)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue