Move lua files for automatic loading
This commit is contained in:
parent
3aeea26b73
commit
5feb871a98
8 changed files with 1 additions and 143 deletions
50
after/plugin/cmp.lua
Normal file
50
after/plugin/cmp.lua
Normal file
|
@ -0,0 +1,50 @@
|
|||
local cmp = require('cmp')
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
['<C-y>'] = cmp.mapping.confirm({ select = true }),
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
['<CR>'] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
}),
|
||||
['<Tab>'] = function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end
|
||||
},
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'vsnip' },
|
||||
{ name = "copilot"},
|
||||
},{
|
||||
{ name = 'buffer' },
|
||||
--{ name = 'path' },
|
||||
}),
|
||||
})
|
||||
|
||||
--cmp.setup.cmdline({ '/', '?' }, {
|
||||
-- mapping = cmp.mapping.preset.cmdline(),
|
||||
-- sources = {
|
||||
-- { name = 'buffer' }
|
||||
-- }
|
||||
--})
|
||||
--
|
||||
---- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
--cmp.setup.cmdline(':', {
|
||||
-- mapping = cmp.mapping.preset.cmdline(),
|
||||
-- sources = cmp.config.sources({ }, {
|
||||
-- { name = 'cmdline' }
|
||||
-- })
|
||||
--})
|
17
after/plugin/indent-blankline.lua
Normal file
17
after/plugin/indent-blankline.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
vim.cmd [[highlight IndentBlanklineIndent1 guibg=#333333 gui=nocombine]]
|
||||
vim.cmd [[highlight IndentBlanklineIndent2 guibg=#000000 gui=nocombine]]
|
||||
|
||||
require("indent_blankline").setup {
|
||||
char = "",
|
||||
char_highlight_list = {
|
||||
"IndentBlanklineIndent1",
|
||||
"IndentBlanklineIndent2",
|
||||
},
|
||||
space_char_highlight_list = {
|
||||
"IndentBlanklineIndent1",
|
||||
"IndentBlanklineIndent2",
|
||||
},
|
||||
show_trailing_blankline_indent = false,
|
||||
show_current_context = true,
|
||||
show_current_context_start = true,
|
||||
}
|
35
after/plugin/telescope.lua
Normal file
35
after/plugin/telescope.lua
Normal file
|
@ -0,0 +1,35 @@
|
|||
local map = vim.keymap.set
|
||||
telescope = require('telescope')
|
||||
telescope.builtin = require('telescope.builtin')
|
||||
|
||||
telescope.setup {
|
||||
extensions = {
|
||||
fzf = {
|
||||
fuzzy = true, -- false will only do exact matching
|
||||
override_generic_sorter = true, -- override the generic sorter
|
||||
override_file_sorter = true, -- override the file sorter
|
||||
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
|
||||
-- the default case_mode is "smart_case"
|
||||
},
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown {
|
||||
-- even more opts
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
telescope.load_extension('fzf')
|
||||
telescope.load_extension("ui-select")
|
||||
|
||||
|
||||
--telescope.load_extension('lsp_handlers')
|
||||
--
|
||||
map('n', 'gff', telescope.builtin.fd)
|
||||
map('n', 'gfg', telescope.builtin.git_files)
|
||||
map('n', 'gfs', telescope.builtin.git_status)
|
||||
map('n', 'gs', telescope.builtin.git_status)
|
||||
map('n', 'gs', telescope.builtin.lsp_dynamic_workspace_symbols)
|
||||
map('n', 'g/', telescope.builtin.live_grep)
|
||||
map('n', '<C-/>', telescope.builtin.current_buffer_fuzzy_find)
|
||||
map('n', '<leader>*', telescope.builtin.grep_string)
|
||||
map('n', 'gb', telescope.builtin.buffers)
|
16
after/plugin/treesitter.lua
Normal file
16
after/plugin/treesitter.lua
Normal file
|
@ -0,0 +1,16 @@
|
|||
require'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = { "typescript" },
|
||||
sync_install = true,
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
indent = {
|
||||
enable = true
|
||||
},
|
||||
}
|
11
after/plugin/trouble.lua
Normal file
11
after/plugin/trouble.lua
Normal file
|
@ -0,0 +1,11 @@
|
|||
require("trouble").setup {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
}
|
||||
vim.api.nvim_set_keymap("n", "<leader>xx", "<cmd>Trouble<cr>", {silent = true, noremap = true})
|
||||
vim.api.nvim_set_keymap("n", "<leader>xw", "<cmd>Trouble workspace_diagnostics<cr>", {silent = true, noremap = true})
|
||||
vim.api.nvim_set_keymap("n", "<leader>xd", "<cmd>Trouble document_diagnostics<cr>", {silent = true, noremap = true})
|
||||
vim.api.nvim_set_keymap("n", "<leader>xl", "<cmd>Trouble loclist<cr>", {silent = true, noremap = true})
|
||||
vim.api.nvim_set_keymap("n", "<leader>xq", "<cmd>Trouble quickfix<cr>", {silent = true, noremap = true})
|
||||
vim.api.nvim_set_keymap("n", "gR", "<cmd>Trouble lsp_references<cr>", {silent = true, noremap = true})
|
Loading…
Add table
Add a link
Reference in a new issue