-
-
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.
Merge pull request #30 from thuanpham2311/feat/coq_nvim
Feat/coq nvim
- Loading branch information
Showing
19 changed files
with
327 additions
and
413 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
" Set recommended to false | ||
let g:coq_settings = { "keymap.recommended": v:false } | ||
|
||
" Keybindings | ||
ino <silent><expr> <Esc> pumvisible() ? "\<C-e><Esc>" : "\<Esc>" | ||
ino <silent><expr> <C-c> pumvisible() ? "\<C-e><C-c>" : "\<C-c>" | ||
ino <silent><expr> <BS> pumvisible() ? "\<C-e><BS>" : "\<BS>" | ||
ino <silent><expr> <CR> pumvisible() ? (complete_info().selected == -1 ? "\<C-e><CR>" : "\<C-y>") : "\<CR>" | ||
ino <silent><expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>" | ||
ino <silent><expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<BS>" | ||
lua << EOF | ||
vim.g.coq_settings = { | ||
['keymap.jump_to_mark'] = '<C-s>', | ||
} | ||
EOF |
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,8 @@ | ||
local nvim_lsp = require('lspconfig') | ||
local protocol = require('vim.lsp.protocol') | ||
|
||
local on_attach = function(client, bufnr) | ||
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end | ||
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end | ||
|
||
end |
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,14 @@ | ||
local lsp_installer = require("nvim-lsp-installer") | ||
|
||
lsp_installer.on_server_ready(function(server) | ||
local opts = {} | ||
|
||
-- (optional) Customize the options passed to the server | ||
-- if server.name == "tsserver" then | ||
-- opts.root_dir = function() ... end | ||
-- end | ||
|
||
-- This setup() function is exactly the same as lspconfig's setup function (:help lspconfig-quickstart) | ||
server:setup(opts) | ||
vim.cmd [[ do User LspAttachBuffers ]] | ||
end) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
snippet unlicense | ||
This is free and unencumbered software released into the public domain. | ||
|
||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any | ||
means. | ||
|
||
In jurisdictions that recognize copyright laws, the author or authors | ||
of this software dedicate any and all copyright interest in the | ||
software to the public domain. We make this dedication for the benefit | ||
of the public at large and to the detriment of our heirs and | ||
successors. We intend this dedication to be an overt act of | ||
relinquishment in perpetuity of all present and future rights to this | ||
software under copyright law. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
For more information, please refer to <https://unlicense.org> | ||
|
||
snippet import_sh | ||
#! /usr/bin/env sh | ||
|
||
snippet import_py | ||
#! /usr/bin/env python3 | ||
|
||
snippet import_fish | ||
#! /usr/bin/env fish | ||
|
||
snippet import_wolframscript | ||
#! /usr/bin/env wolframscript | ||
|
||
snippet import_cpp | ||
#include <iostream> | ||
|
||
int main() { | ||
return 0; | ||
} | ||
|
||
snippet import_html | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title></title> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |
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,76 @@ | ||
snippet if | ||
if ( $1 ) { | ||
$2 | ||
} | ||
|
||
snippet for | ||
for (int ${1:i} = 0; $1 < ${2:n}; $1++) { | ||
$0 | ||
} | ||
|
||
snippet do | ||
do { | ||
1; | ||
} while ($2); | ||
|
||
snippet while | ||
while ($1) { | ||
$2; | ||
} | ||
|
||
snippet main | ||
#include <iostream> | ||
using namespace std; | ||
|
||
int main() { | ||
return 0; | ||
} | ||
|
||
snippet kiemTraSoNguyenTo | ||
bool kiemTraSoNguyenTo(int number) { | ||
bool flag = false; | ||
int count = 0; | ||
|
||
if (number < 2 || number > 100) { | ||
flag = false; | ||
} else { | ||
for (int i = 2; i <= number / 2; i++) { | ||
if (number % i == 0) { | ||
count++; | ||
} | ||
} | ||
if (count == 0) { | ||
flag = true; | ||
} | ||
} | ||
return flag; | ||
} | ||
|
||
snippet nhapSoNguyenDuong | ||
int nhapSoNguyenDuong(int &n) { | ||
do { | ||
cin >> n; | ||
} while (n <= 0); | ||
|
||
return n; | ||
} | ||
|
||
snippet kiemTraSoHoangThien | ||
bool kiemTraSoHoangThien(int number) { | ||
int sum = 0; | ||
int flag = false; | ||
|
||
for (int i = 1; i < number; i++) { | ||
if (number % i == 0) { | ||
sum += i; | ||
} | ||
} | ||
|
||
if (sum == number) { | ||
flag = true; | ||
} else { | ||
flag = false; | ||
} | ||
|
||
return flag; | ||
} |
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,14 @@ | ||
snippet NhapMang | ||
public static void NhapMang(int[] array, int number) { | ||
for (int i = 0; i < number; i++) { | ||
Console.Write("Nhập phần tử thứ " + (i + 1) + ": "); | ||
array[i] = Convert.ToInt32(Console.ReadLine()); | ||
} | ||
} | ||
|
||
snippet XuatMang | ||
public static void XuatMang(int[] array, int number) { | ||
for (int i = 0; i < number; i++) { | ||
Console.Write(array[i] + "\t"); | ||
} | ||
} |
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,35 @@ | ||
snippet feature | ||
🌟feature($0): $1 | ||
|
||
snippet fix | ||
🐞fix($0): $1 | ||
|
||
snippet documents | ||
📚documents($0): $1 | ||
|
||
snippet style | ||
💄style($0): $1 | ||
|
||
snippet refactor | ||
🎨refactor($0): $1 | ||
|
||
snippet performance | ||
⚡️performance($0): $1 | ||
|
||
snippet test | ||
✅test($0): $1 | ||
|
||
snippet chore | ||
🔩chore($0): $1 | ||
|
||
snippet build | ||
🔨build($0): $1 | ||
|
||
snippet ci | ||
🤖ci($0): $1 | ||
|
||
snippet clean_code | ||
💄style($0): clean code | ||
|
||
snippet revert | ||
⏪revert($0): $1 |
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,7 @@ | ||
snippet cl | ||
console.log( $1 ); | ||
|
||
snippet for | ||
for (let i = 0; $1 ; i++) { | ||
$2 | ||
} |
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,92 @@ | ||
snippet youtubeDefaultDescription | ||
👋 Hi folks | ||
• I'm a random nerd, finding something fun to do every day. | ||
• Filming yourself for fun while I live in the earth. | ||
• I disable comment by default. So if you have something want to talk with me go to the link below. | ||
• Connect with me: https://bio.link/thuanpham2311 | ||
|
||
==DISCLAIMER== | ||
My stories, lessons, and advice are my personal experience, not reflecting opinions from any organization or company. | ||
|
||
==© copyright== | ||
• There is no need to email me for permission. | ||
• Use my content however you want! Email it, share it, reprint it with or without credit. | ||
• Change it around, put in a bunch of swear words and attribute them to me. | ||
⇒ It's okay! You just DO WHAT THE F**K YOU WANT TO. | ||
|
||
#thuanpham2311 | ||
|
||
snippet talk-show | ||
# Talk show $strftime("%b %d, %Y") | ||
|
||
📚 Chapters | ||
|
||
- 0:00 Hi | ||
|
||
**Note:** | ||
|
||
- $1 | ||
|
||
👋 Hi folks | ||
• I'm a random nerd, finding something fun to do every day. | ||
• Filming yourself for fun while I live in the earth. | ||
• I disable comment by default. So if you have something want to talk with me go to the link below. | ||
• Connect with me: https://bio.link/thuanpham2311 | ||
|
||
==DISCLAIMER== | ||
My stories, lessons, and advice are my personal experience, not reflecting opinions from any organization or company. | ||
|
||
==© copyright== | ||
• There is no need to email me for permission. | ||
• Use my content however you want! Email it, share it, reprint it with or without credit. | ||
• Change it around, put in a bunch of swear words and attribute them to me. | ||
⇒ It's okay! You just DO WHAT THE F**K YOU WANT TO. | ||
|
||
#thuanpham2311 | ||
|
||
snippet post | ||
--- | ||
title: $1 | ||
author: thuanpham2311 | ||
date: "%Y-%m-%d %H:%M" | ||
categories: [Blogging] | ||
tags: [$2] | ||
--- | ||
|
||
$3 | ||
|
||
**Reference** | ||
|
||
- Thông tin về tui: <https://bio.link/thuanpham2311> | ||
|
||
--- | ||
|
||
**DISCLAIMER** | ||
|
||
Những câu chuyện, bài học và lời khuyên của tui là những trải nghiệm riêng của cá nhân, không phản ánh ý kiến từ những tổ chức hay công ty nào. Đa phần lời tui viết là chém gió, nên mấy chế nên suy ngẫm nó có phù hợp với hoàn cảnh của bản thân không nha. | ||
|
||
snippet video | ||
--- | ||
- Author: $1 | ||
- Link: $2 | ||
> #video | ||
|
||
snippet article | ||
--- | ||
- Author: $1 | ||
- Link: $2 | ||
> #article | ||
|
||
snippet shortLink | ||
--- | ||
redirect_to: $1 | ||
--- | ||
|
||
snippet ~~ | ||
*$0* | ||
|
||
snippet ** | ||
**$0** | ||
|
||
snippet * | ||
~~$0~~ |
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,2 @@ | ||
snippet plug | ||
Plug '$1' |
Oops, something went wrong.