-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
51 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.env | ||
node_modules/ | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
-- Options are automatically loaded before lazy.nvim startup | ||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua | ||
-- Add any additional options here | ||
local opt = vim.opt | ||
|
||
opt.colorcolumn = '100' | ||
opt.relativenumber = false | ||
opt.winbar = "%=%m %f" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
return {{ | ||
"hrsh7th/nvim-cmp", | ||
dependencies = {"hrsh7th/cmp-emoji"}, | ||
---@param opts cmp.ConfigSchema | ||
opts = function(_, opts) | ||
local has_words_before = function() | ||
unpack = unpack or table.unpack | ||
local line, col = unpack(vim.api.nvim_win_get_cursor(0)) | ||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil | ||
end | ||
|
||
local luasnip = require("luasnip") | ||
local cmp = require("cmp") | ||
|
||
opts.mapping = vim.tbl_extend("force", opts.mapping, { | ||
["<Tab>"] = cmp.mapping(function(fallback) | ||
if cmp.visible() then | ||
cmp.select_next_item() | ||
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable() | ||
-- this way you will only jump inside the snippet region | ||
elseif luasnip.expand_or_jumpable() then | ||
luasnip.expand_or_jump() | ||
elseif has_words_before() then | ||
cmp.complete() | ||
else | ||
fallback() | ||
end | ||
end, {"i", "s"}), | ||
["<S-Tab>"] = cmp.mapping(function(fallback) | ||
if cmp.visible() then | ||
cmp.select_prev_item() | ||
elseif luasnip.jumpable(-1) then | ||
luasnip.jump(-1) | ||
else | ||
fallback() | ||
end | ||
end, {"i", "s"}) | ||
}) | ||
end | ||
}} |