Initial commit

This commit is contained in:
2024-01-28 14:26:18 -06:00
commit 9b6eca40d5
27 changed files with 1167 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
local plugins = {
'rebelot/kanagawa.nvim',
'nvim-lualine/lualine.nvim',
'kyazdani42/nvim-web-devicons',
'kylechui/nvim-surround',
{
'ibhagwan/fzf-lua',
config = function()
require('fzf-lua').setup({'skim'})
end
},
'neovim/nvim-lspconfig',
'hrsh7th/nvim-cmp',
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-path',
'rust-lang/rust.vim',
{
'windwp/nvim-autopairs',
event = 'InsertEnter',
opts={},
},
}
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup(plugins, opts)

View File

@@ -0,0 +1,38 @@
local capabilities = require('cmp_nvim_lsp').default_capabilities()
local lspconfig = require('lspconfig')
vim.lsp.set_log_level('debug')
local servers = {'ccls', 'rust_analyzer'}
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
capabilities = capabilities
}
end
local cmp = require 'cmp'
cmp.setup {
mapping = cmp.mapping.preset.insert({
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end, { 'i', 's' }),
['<S-Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end, { 'i', 's' }),
}),
sources = {
{ name = 'nvim_lsp' },
{ name = 'path' }
},
}

View File

@@ -0,0 +1,36 @@
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'wombat',
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
disabled_filetypes = {},
always_divide_middle = true,
globalstatus = true,
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {'filename'},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {'filename'},
lualine_x = {'location'},
lualine_y = {},
lualine_z = {}
},
tabline = {
lualine_a = {'buffers'},
lualine_b = {'branch'},
lualine_c = {'filename'},
lualine_x = {},
lualine_y = {},
lualine_z = {'tabs'}
},
extensions = {}
}