Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ require("scope").setup()
-- require "user.colorizer"
vim.cmd(":COQnow --shut-up")
vim.cmd(":set laststatus=3")
vim.g.UltiSnipsExpandTrigger="<alt>"
vim.g.UltiSnipsJumpForwardTrigger="<c-b>"
vim.g.UltiSnipsJumpBackwardTrigger="<c-z>"
30 changes: 21 additions & 9 deletions lua/user/coqCmp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,31 @@ local kind_icons = {
}

local servers = {
"sumneko_lua",
"cssls",
"html",
"tsserver",
"pyright",
"bashls",
"jsonls",
-- "yamlls",
"sumneko_lua",
"cssls",
"html",
"tsserver",
"pyright",
"bashls",
"jsonls",
-- "yamlls",
}

vim.g.coq_settings = {
['keymap.bigger_preview'] = "<c-0>",
['keymap.jump_to_mark'] = "<c-9>",
['keymap.eval_snips'] = "<leader>j",
['display.icons.mappings'] = kind_icons,
['clients.lsp.always_on_top'] = servers
['clients.lsp.always_on_top'] = servers,
['completion.skip_after'] = { "{", "}", "[", "]", ";" , "(", ")"},
-- ['display.pum.fast_close'] = false
['display.preview.border'] = { { "", "NormalFloat" }, { "", "NormalFloat" }, { "", "NormalFloat" },
{ " ", "NormalFloat" },
{ "", "NormalFloat" }, { "", "NormalFloat" }, { "", "NormalFloat" }, { " ", "NormalFloat" }, },
}

-- coq.thirdparty config
require("coq_3p") {
{ src = "nvimlua", short_name = "nLUA" },
{ src = "figlet", short_name = "BIG", fonts = { "/usr/share/figlet/fonts/DeltaCorpsPriest1.flf" } }
}
3 changes: 1 addition & 2 deletions lua/user/lsp/null-ls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ null_ls.setup {
sources = {
formatting.prettier.with {
extra_filetypes = { "toml" },
extra_args = { "--double-quote", "--jsx-single-quote" },
extra_args = { "--double-quote", "--jsx-single-quote", "--tsx-single-quote" },
},
formatting.black.with { extra_args = { "--fast" } },
formatting.stylua,
formatting.google_java_format,
diagnostics.flake8,
},
}
77 changes: 69 additions & 8 deletions lua/user/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ return packer.startup(function(use)
as = "catppuccin", }

-- cmp plugins
use { "hrsh7th/nvim-cmp"} -- The completion plugin
-- use { "hrsh7th/nvim-cmp"} -- The completion plugin
-- use { "hrsh7th/cmp-buffer"} -- buffer completions
-- use { "hrsh7th/cmp-path"} -- path completions
-- use { "hrsh7th/cmp-vsnip"}
Expand All @@ -81,7 +81,7 @@ return packer.startup(function(use)
-- use { "hrsh7th/cmp-nvim-lsp"}
-- use { "hrsh7th/cmp-nvim-lua"}

-- use "christianchiarulli/nvim-cmp"
use "christianchiarulli/nvim-cmp"
-- use "hrsh7th/cmp-buffer" -- buffer completions
-- use "hrsh7th/cmp-path" -- path completions
-- use "hrsh7th/cmp-cmdline" -- cmdline completions
Expand All @@ -95,7 +95,46 @@ return packer.startup(function(use)

-- snippets
use { "L3MON4D3/LuaSnip" } --snippet engine
use { "rafamadriz/friendly-snippets" } -- a bunch of snippets to use

-- vim-react-snippets
use { 'SirVer/ultisnips'}
use { 'epilande/vim-react-snippets' }
use {'honza/vim-snippets'}
-- use { "rafamadriz/friendly-snippets" } -- a bunch of snippets to use

-- Pum popup
use { "Shougo/pum.vim" }

use {
"smjonas/snippet-converter.nvim",
-- SnippetConverter uses semantic versioning. Example: use version = "1.*" to avoid breaking changes on version 1.
-- Uncomment the next line to follow stable releases only.
-- tag = "*",
config = function()
local template = {
-- name = "t1", (optionally give your template a name to refer to it in the `ConvertSnippets` command)
sources = {
ultisnips = {
-- Add snippets from (plugin) folders or individual files on your runtimepath...
"./vim-snippets/UltiSnips",
-- ...or use absolute paths on your system.
},
},
output = {
-- Specify the output formats and paths
vscode_luasnip = {
vim.fn.stdpath("config") .. "/UltiSnips",
},
},
}

require("snippet_converter").setup {
templates = { template },
-- To change the default settings (see configuration section in the documentation)
-- settings = {},
}
end
}

-- LSP
use { "williamboman/nvim-lsp-installer" } -- simple to use language server installer
Expand Down Expand Up @@ -161,11 +200,33 @@ return packer.startup(function(use)
-- startup Time
use { "dstein64/vim-startuptime" }

use { "abecodes/tabout.nvim",
wants = { 'nvim-treesitter' }, -- or require if not used so far
after = { 'nvim-cmp' } -- if a completion plugin is using tabs load it before
}

use {
'abecodes/tabout.nvim',
config = function()
require('tabout').setup {
tabkey = '<Tab>', -- key to trigger tabout, set to an empty string to disable
backwards_tabkey = '<S-Tab>', -- key to trigger backwards tabout, set to an empty string to disable
act_as_tab = true, -- shift content if tab out is not possible
act_as_shift_tab = false, -- reverse shift content if tab out is not possible (if your keyboard/terminal supports <S-Tab>)
default_tab = '<C-t>', -- shift default action (only at the beginning of a line, otherwise <TAB> is used)
default_shift_tab = '<C-d>', -- reverse shift default action,
enable_backwards = true, -- well ...
completion = true, -- if the tabkey is used in a completion pum
tabouts = {
{open = "'", close = "'"},
{open = '"', close = '"'},
{open = '`', close = '`'},
{open = '(', close = ')'},
{open = '[', close = ']'},
{open = '{', close = '}'}
},
ignore_beginning = true, --[[ if the cursor is at the beginning of a filled element it will rather tab out than shift the content ]]
exclude = {} -- tabout will ignore these filetypes
}
end,
wants = {'nvim-treesitter'}, -- or require if not used so far
after = {'nvim-cmp'} -- if a completion plugin is using tabs load it before
}
-- -- Color Shower
use { "norcalli/nvim-colorizer.lua" }

Expand Down
53 changes: 27 additions & 26 deletions lua/user/treesitter.lua
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
local status_ok, configs = pcall(require, "nvim-treesitter.configs")
if not status_ok then
return
return
end
configs.setup({
ensure_installed = "all",
-- ensure_installed = "all", -- one of "all" or a list of languages
ignore_install = { "" }, -- List of parsers to ignore installing
sync_install = false, -- install languages synchronously (only applied to `ensure_installed`)
highlight = {
enable = true, -- false will disable the whole extension
disable = { "css" }, -- list of language that will be disabled
additional_vim_highlighting = false,
},
autopairs = {
enable = true,
},
indent = { enable = true, disable = { "python", "css" } },
ensure_installed = { "c", "cpp", "lua", "javascript", "typescript", "python", "bash", "cmake", "json5", "gitignore",
"css", "json", "vim", "dockerfile", "html", "css", "yaml", "markdown", "sql" },
-- ensure_installed = "all", -- one of "all" or a list of languages
-- ignore_install = { "" }, -- List of parsers to ignore installing
sync_install = true, -- install languages synchronously (only applied to `ensure_installed`)
highlight = {
enable = true, -- false will disable the whole extension
disable = { "css" }, -- list of language that will be disabled
additional_vim_highlighting = false,
},
autopairs = {
enable = true,
},
indent = { enable = true, disable = { "python", "css" } },

context_commentstring = {
enable = true,
enable_autocmd = false,
},
rainbow = {
enable = true,
-- disable = { "jsx", "cpp" }, list of languages you want to disable the plugin for
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
max_file_lines = nil, -- Do not enable for files with more than n lines, int
-- colors = {}, -- table of hex strings
-- termcolors = {} -- table of colour name strings
},
context_commentstring = {
enable = true,
enable_autocmd = false,
},
rainbow = {
enable = true,
-- disable = { "jsx", "cpp" }, list of languages you want to disable the plugin for
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
max_file_lines = nil, -- Do not enable for files with more than n lines, int
-- colors = {}, -- table of hex strings
-- termcolors = {} -- table of colour name strings
},
autotag = {
enable = true,
}
Expand Down