diff options
| author | Nanderty <psopka@sopka.ch> | 2023-03-12 15:07:53 +0100 |
|---|---|---|
| committer | Nanderty <psopka@sopka.ch> | 2023-03-12 15:07:53 +0100 |
| commit | c87bea68983be1a4ab0bdce3bb2ac19ad35f0a81 (patch) | |
| tree | 245b4cca0fb59a5abdff645fa8bd145a021a7908 /lua/Nanderty/Plugins | |
| download | neovim-config-c87bea68983be1a4ab0bdce3bb2ac19ad35f0a81.tar.gz neovim-config-c87bea68983be1a4ab0bdce3bb2ac19ad35f0a81.tar.bz2 neovim-config-c87bea68983be1a4ab0bdce3bb2ac19ad35f0a81.zip | |
neovim setup
Diffstat (limited to 'lua/Nanderty/Plugins')
| -rw-r--r-- | lua/Nanderty/Plugins/bufferline.lua | 2 | ||||
| -rw-r--r-- | lua/Nanderty/Plugins/cmp.lua | 60 | ||||
| -rw-r--r-- | lua/Nanderty/Plugins/lualine.lua | 5 | ||||
| -rw-r--r-- | lua/Nanderty/Plugins/startify.lua | 0 | ||||
| -rw-r--r-- | lua/Nanderty/Plugins/telescope.lua | 6 | ||||
| -rw-r--r-- | lua/Nanderty/Plugins/treesitter.lua | 13 | ||||
| -rw-r--r-- | lua/Nanderty/Plugins/vimtex.lua | 5 |
7 files changed, 91 insertions, 0 deletions
diff --git a/lua/Nanderty/Plugins/bufferline.lua b/lua/Nanderty/Plugins/bufferline.lua new file mode 100644 index 0000000..c5accc7 --- /dev/null +++ b/lua/Nanderty/Plugins/bufferline.lua @@ -0,0 +1,2 @@ +vim.opt.termguicolors = true +require("bufferline").setup{} diff --git a/lua/Nanderty/Plugins/cmp.lua b/lua/Nanderty/Plugins/cmp.lua new file mode 100644 index 0000000..2c73b05 --- /dev/null +++ b/lua/Nanderty/Plugins/cmp.lua @@ -0,0 +1,60 @@ +require('mason').setup() + +require('mason-lspconfig').setup({ + ensure_installed = { + } +}) + +local lsp_capabilities = require('cmp_nvim_lsp').default_capabilities() +local lsp_attach = function(client, bufnr) +end + +local lspconfig = require('lspconfig') +require('mason-lspconfig').setup_handlers({ + function(server_name) + lspconfig[server_name].setup({ + on_attach = lsp_attach, + capabilities = lsp_capabilities, + }) + end, +}) + +local cmp = require'cmp' + +cmp.setup({ + snippet = { + expand = function(args) + vim.fn["UltiSnips#Anon"](args.body) + end, + }, + window = { + }, + mapping = cmp.mapping.preset.insert({ + ['<C-b>'] = cmp.mapping.scroll_docs(-4), + ['<C-f>'] = cmp.mapping.scroll_docs(4), + ['<C-Space>'] = cmp.mapping.complete(), + ['<C-e>'] = cmp.mapping.abort(), + ['<CR>'] = cmp.mapping.confirm({ select = true }), + }), + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + { name = 'ultisnips' }, + { name = 'omni' }, + { name = 'buffer' }, + }) +}) + +local lsp_capabilities = require('cmp_nvim_lsp').default_capabilities() +local lsp_attach = function(client, bufnr) + -- Create your keybindings here... +end + +local lspconfig = require('lspconfig') +require('mason-lspconfig').setup_handlers({ + function(server_name) + lspconfig[server_name].setup({ + on_attach = lsp_attach, + capabilities = lsp_capabilities, + }) + end, +}) diff --git a/lua/Nanderty/Plugins/lualine.lua b/lua/Nanderty/Plugins/lualine.lua new file mode 100644 index 0000000..5ace147 --- /dev/null +++ b/lua/Nanderty/Plugins/lualine.lua @@ -0,0 +1,5 @@ +require('lualine').setup { + options = { + theme = 'onedark' + } +} diff --git a/lua/Nanderty/Plugins/startify.lua b/lua/Nanderty/Plugins/startify.lua new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/lua/Nanderty/Plugins/startify.lua diff --git a/lua/Nanderty/Plugins/telescope.lua b/lua/Nanderty/Plugins/telescope.lua new file mode 100644 index 0000000..4806008 --- /dev/null +++ b/lua/Nanderty/Plugins/telescope.lua @@ -0,0 +1,6 @@ +local builtin = require('telescope.builtin') +vim.keymap.set('n', '<leader>pf', builtin.find_files, {}) +vim.keymap.set('n', '<C-p>', builtin.git_files, {}) +vim.keymap.set('n', '<leader>ps', function() + builtin.grep_string({ search = vim.fn.input("Grep > ") }); +end) diff --git a/lua/Nanderty/Plugins/treesitter.lua b/lua/Nanderty/Plugins/treesitter.lua new file mode 100644 index 0000000..7baec80 --- /dev/null +++ b/lua/Nanderty/Plugins/treesitter.lua @@ -0,0 +1,13 @@ +require'nvim-treesitter.configs'.setup { + ensure_installed = {"help", "javascript", "html", "css", "python", "cpp", "c", "lua", "php",}, + + sync_install = false, + + auto_install = true, + + + highlight = { + enable = true, + + }, +} diff --git a/lua/Nanderty/Plugins/vimtex.lua b/lua/Nanderty/Plugins/vimtex.lua new file mode 100644 index 0000000..511c2bf --- /dev/null +++ b/lua/Nanderty/Plugins/vimtex.lua @@ -0,0 +1,5 @@ +vim.g.tex_flavor='latex' +vim.g.vimtex_view_mehtod = 'mupdf' +vim.g.vimtex_quickfix_open_on_warning = 0 + +vim.keymap.set('n', '<leader>ll', '<Cmd>VimtexCompile<CR>', {} ) |
