mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-16 23:22:37 +00:00
Compare commits
5 Commits
2c7bd9123f
...
6d44edc94d
| Author | SHA1 | Date | |
|---|---|---|---|
|
6d44edc94d
|
|||
|
381d272da1
|
|||
|
38e77e8fcd
|
|||
|
2a5c2cdc58
|
|||
|
0949f9e9fa
|
57
nvim/m-housh/lua/user/plugin/blink.lua
Normal file
57
nvim/m-housh/lua/user/plugin/blink.lua
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"saghen/blink.cmp",
|
||||||
|
dependencies = {
|
||||||
|
"rafamadriz/friendly-snippets",
|
||||||
|
--"L3MON4D3/LuaSnip",
|
||||||
|
},
|
||||||
|
version = "v0.*",
|
||||||
|
opts = {
|
||||||
|
appearance = {
|
||||||
|
use_nvim_cmp_as_default = true,
|
||||||
|
nerd_font_variant = "mono",
|
||||||
|
},
|
||||||
|
signature = { enabled = true },
|
||||||
|
keymap = {
|
||||||
|
preset = "default",
|
||||||
|
["<CR>"] = { "accept", "fallback" },
|
||||||
|
["<C-space>"] = {
|
||||||
|
function(cmp)
|
||||||
|
cmp.show({ providers = { "snippets" } })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
--["<C-k>"] = { "select_prev", "fallback" },
|
||||||
|
--["<C-j>"] = { "select_next", "fallback" },
|
||||||
|
["<C-n>"] = {
|
||||||
|
function(cmp)
|
||||||
|
if cmp.snippet_active() then
|
||||||
|
return cmp.accept()
|
||||||
|
else
|
||||||
|
return cmp.select_and_accept()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
"snippet_forward",
|
||||||
|
"fallback",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- snippets = {
|
||||||
|
-- expand = function(snippet)
|
||||||
|
-- require("luasnip").lsp_expand(snippet)
|
||||||
|
-- end,
|
||||||
|
-- active = function(filter)
|
||||||
|
-- if filter and filter.direction then
|
||||||
|
-- return require("luasnip").jumpable(filter.direction)
|
||||||
|
-- end
|
||||||
|
-- return require("luasnip").in_snippet()
|
||||||
|
-- end,
|
||||||
|
-- jump = function(direction)
|
||||||
|
-- require("luasnip").jump(direction)
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
|
sources = {
|
||||||
|
default = { "lsp", "path", "snippets", "buffer" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts_extend = { "sources.default" },
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
|
enabled = false,
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ return {
|
|||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
-- "hrsh7th/cmp-nvim-lsp",
|
||||||
|
"saghen/blink.cmp",
|
||||||
{ "antosha417/nvim-lsp-file-operations", config = true },
|
{ "antosha417/nvim-lsp-file-operations", config = true },
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
@@ -37,8 +38,9 @@ return {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
--local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
||||||
local capabilities = cmp_nvim_lsp.default_capabilities()
|
--local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||||
|
local capabilities = require("blink.cmp").get_lsp_capabilities()
|
||||||
local opts = { noremap = true, silent = true }
|
local opts = { noremap = true, silent = true }
|
||||||
local on_attach = function(_, bufnr)
|
local on_attach = function(_, bufnr)
|
||||||
opts.buffer = bufnr
|
opts.buffer = bufnr
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
"L3MON4D3/LuaSnip",
|
"L3MON4D3/LuaSnip",
|
||||||
|
version = "v2.*",
|
||||||
config = function()
|
config = function()
|
||||||
local ls = require("luasnip")
|
local ls = require("luasnip")
|
||||||
local types = require("luasnip.util.types")
|
local types = require("luasnip.util.types")
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ o.shiftwidth = 2 -- the number of spaces inserted for each indentation
|
|||||||
o.tabstop = 2 -- how many columns a tab counts for
|
o.tabstop = 2 -- how many columns a tab counts for
|
||||||
o.termguicolors = true -- set term gui colors (most terminals support this)
|
o.termguicolors = true -- set term gui colors (most terminals support this)
|
||||||
o.cursorline = true -- highlight the current line
|
o.cursorline = true -- highlight the current line
|
||||||
o.scrolloff = 8 -- Minimal number of screen lines to keep above and below the cursor
|
o.scrolloff = 20 -- Minimal number of screen lines to keep above and below the cursor
|
||||||
o.sidescrolloff = 5 -- The minimal number of columns to scroll horizontally
|
o.sidescrolloff = 5 -- The minimal number of columns to scroll horizontally
|
||||||
o.hlsearch = false -- highlight all matches on previous search pattern
|
o.hlsearch = false -- highlight all matches on previous search pattern
|
||||||
o.ignorecase = true -- ignore case in search patterns
|
o.ignorecase = true -- ignore case in search patterns
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ config.window_padding = {
|
|||||||
}
|
}
|
||||||
config.window_close_confirmation = "NeverPrompt"
|
config.window_close_confirmation = "NeverPrompt"
|
||||||
--config.window_decorations = 'TITLE'
|
--config.window_decorations = 'TITLE'
|
||||||
|
-- Set higher fps
|
||||||
|
config.max_fps = 120
|
||||||
|
|
||||||
-- Tab Bar
|
-- Tab Bar
|
||||||
config.show_tabs_in_tab_bar = true
|
config.show_tabs_in_tab_bar = true
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ fpath_prepend \
|
|||||||
"$(brew --prefix)/share/zsh/site-functions" \
|
"$(brew --prefix)/share/zsh/site-functions" \
|
||||||
"$(brew --prefix)/share/zsh-completions" \
|
"$(brew --prefix)/share/zsh-completions" \
|
||||||
"$ZDOTDIR/completions" \
|
"$ZDOTDIR/completions" \
|
||||||
"$HOME/.local/completions" \
|
"$HOME/.local/share/zsh/completions" \
|
||||||
"$ZDOTDIR/functions"
|
"$ZDOTDIR/functions"
|
||||||
|
|
||||||
autoload -Uz $fpath[1]/*(.:t)
|
autoload -Uz $fpath[1]/*(.:t)
|
||||||
|
|||||||
Reference in New Issue
Block a user