Run stylua

master
Drake 2 years ago
parent 600b5ed107
commit 3c6fc1b28d

@ -1,29 +1,29 @@
vim.g.did_load_filetypes = 1
--TODO: switch to a more lua friendly plugin manager
require("paq")({
'savq/paq-nvim';
'nathom/filetype.nvim';
'neovim/nvim-lspconfig';
'kyazdani42/nvim-web-devicons';
'nvim-lualine/lualine.nvim';
'nvim-lua/plenary.nvim';
'nvim-telescope/telescope.nvim';
'sainnhe/sonokai';
'nvim-treesitter/nvim-treesitter';
'noib3/cokeline.nvim';
'andweeb/presence.nvim';
'folke/todo-comments.nvim';
'dstein64/vim-startuptime';
{'nvim-telescope/telescope-fzf-native.nvim', run='make'};
'echasnovski/mini.nvim';
'hrsh7th/nvim-cmp';
'hrsh7th/cmp-buffer';
'hrsh7th/cmp-nvim-lsp';
'hrsh7th/cmp-nvim-lua';
'hrsh7th/vim-vsnip';
'hrsh7th/cmp-vsnip';
require('paq')({
'savq/paq-nvim',
'nathom/filetype.nvim',
'neovim/nvim-lspconfig',
'kyazdani42/nvim-web-devicons',
'nvim-lualine/lualine.nvim',
'nvim-lua/plenary.nvim',
'nvim-telescope/telescope.nvim',
'sainnhe/sonokai',
'nvim-treesitter/nvim-treesitter',
'noib3/cokeline.nvim',
'andweeb/presence.nvim',
'folke/todo-comments.nvim',
'dstein64/vim-startuptime',
{ 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' },
'echasnovski/mini.nvim',
'hrsh7th/nvim-cmp',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-nvim-lua',
'hrsh7th/vim-vsnip',
'hrsh7th/cmp-vsnip',
})
require("colorscheme")
require("config")
require("plugins")
require("keybinds")
require('colorscheme')
require('config')
require('plugins')
require('keybinds')

@ -2,14 +2,13 @@
local set = vim.opt
-- Set some stuff up like clipboard and mouse
set.termguicolors = true -- Needed for literally any modern colorscheme
set.mouse = 'a' -- Mouse support
set.termguicolors = true -- Needed for literally any modern colorscheme
set.mouse = 'a' -- Mouse support
set.clipboard = 'unnamedplus' -- Use X11 clipboard
set.pumheight = 5 -- Uhh whatever the fuck this does
set.number = true -- Show line numbers
set.tabstop = 4 -- Set up tabs
set.shiftwidth = 4 -- See above
set.pumheight = 5 -- Uhh whatever the fuck this does
set.number = true -- Show line numbers
set.tabstop = 4 -- Set up tabs
set.shiftwidth = 4 -- See above
set.cursorline = false
-- Autocmds

@ -1,14 +1,14 @@
local map = vim.api.nvim_set_keymap
map('n', '<C-a>', 'ggVG', {noremap=true, silent=true})
map('i', '<C-a>', '<Esc>ggVG', {noremap=true, silent=true})
map('v', '<C-c>', 'y', {noremap=true, silent=true})
map('v', '<C-x>', 'd', {noremap=true, silent=true})
map('v', '<C-v>', 'p', {noremap=true, silent=true})
map('i', '<C-z>', '<Esc>ui', {noremap=true, silent=true})
map('i', '<C-y>', '<Esc>:red<Enter>i', {noremap=true, silent=true})
map('i', '<C-s>', '<Esc>:w<Enter>i', {noremap=true})
map('n', '<C-[>', '<Plug>(cokeline-focus-prev)', {noremap=false})
map('n', '<C-]>', '<Plug>(cokeline-focus-next)', {noremap=false})
map('n', '<C-o>', '<CMD>Telescope find_files<CR>', {noremap=true})
map('n', '<C-f>', '<CMD>Telescope live_grep<CR>', {noremap=true})
map('n', '<C-i>', '<CMD>lua require("FTerm").toggle()<CR>', {noremap=true, silent=true})
map('n', '<C-a>', 'ggVG', { noremap = true, silent = true })
map('i', '<C-a>', '<Esc>ggVG', { noremap = true, silent = true })
map('v', '<C-c>', 'y', { noremap = true, silent = true })
map('v', '<C-x>', 'd', { noremap = true, silent = true })
map('v', '<C-v>', 'p', { noremap = true, silent = true })
map('i', '<C-z>', '<Esc>ui', { noremap = true, silent = true })
map('i', '<C-y>', '<Esc>:red<Enter>i', { noremap = true, silent = true })
map('i', '<C-s>', '<Esc>:w<Enter>i', { noremap = true })
map('n', '<C-[>', '<Plug>(cokeline-focus-prev)', { noremap = false })
map('n', '<C-]>', '<Plug>(cokeline-focus-next)', { noremap = false })
map('n', '<C-o>', '<CMD>Telescope find_files<CR>', { noremap = true })
map('n', '<C-f>', '<CMD>Telescope live_grep<CR>', { noremap = true })
map('n', '<C-i>', '<CMD>lua require("FTerm").toggle()<CR>', { noremap = true, silent = true })

@ -15,74 +15,80 @@ local function filenameIfFileOpened()
end
require('lualine').setup({
options = {
icons_enabled = true,
theme = 'sonokai',
component_separators = {left = '', right = ''},
section_separators = {left = '', right = ''},
disabled_filetypes = {}
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch'},
lualine_c = {filenameIfFileOpened},
lualine_x = {'fileformat'},
lualine_y = {'diff'},
lualine_z = {'filetype'}
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {filenameIfFileOpened},
lualine_x = {'location'},
lualine_y = {},
lualine_z = {}
},
tabline = {},
extensions = {}
options = {
icons_enabled = true,
theme = 'sonokai',
component_separators = { left = '', right = '' },
section_separators = { left = '', right = '' },
disabled_filetypes = {},
},
sections = {
lualine_a = { 'mode' },
lualine_b = { 'branch' },
lualine_c = { filenameIfFileOpened },
lualine_x = { 'fileformat' },
lualine_y = { 'diff' },
lualine_z = { 'filetype' },
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { filenameIfFileOpened },
lualine_x = { 'location' },
lualine_y = {},
lualine_z = {},
},
tabline = {},
extensions = {},
})
-- Credit to the original author of cokeline for creating most of this config
require('cokeline').setup({
default_hl = {
focused = {
fg = get_hex('Normal', 'fg'),
bg = get_hex('Background', 'bg'),
},
unfocused = {
fg = get_hex('Comment', 'fg'),
bg = get_hex('Background', 'bg'),
},
},
default_hl = {
focused = {
fg = get_hex('Normal', 'fg'),
bg = get_hex('Background', 'bg'),
},
unfocused = {
fg = get_hex('Comment', 'fg'),
bg = get_hex('Background', 'bg'),
},
},
components = {
{
text = function(buffer)
if buffer.is_focused then
return '' .. buffer.devicon.icon
else
return '| ' .. buffer.devicon.icon
end
end,
hl = {
fg = function(buffer) return buffer.devicon.color end,
},
},
{
text = function(buffer) return buffer.unique_prefix end,
hl = {
style = 'italic',
},
},
{
text = function(buffer) return buffer.filename .. ' ' end,
},
{
text = 'X',
delete_buffer_on_left_click = true,
},
{
text = ' ',
},
},
components = {
{
text = function(buffer)
if buffer.is_focused then
return '' .. buffer.devicon.icon
else
return '| ' .. buffer.devicon.icon
end
end,
hl = {
fg = function(buffer)
return buffer.devicon.color
end,
},
},
{
text = function(buffer)
return buffer.unique_prefix
end,
hl = {
style = 'italic',
},
},
{
text = function(buffer)
return buffer.filename .. ' '
end,
},
{
text = 'X',
delete_buffer_on_left_click = true,
},
{
text = ' ',
},
},
})

@ -6,7 +6,7 @@ cmp.setup({
snippet = {
expand = function(args)
vim.fn['vsnip#anonymous'](args.body)
end
end,
},
mapping = {
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
@ -17,38 +17,38 @@ cmp.setup({
else
fallback()
end
end
end,
},
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'nvim_lua' },
{ name = 'vsnip' },
{ name = 'buffer' }
})
{ name = 'buffer' },
}),
})
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
require('lspconfig').clangd.setup({
capabilities = capabilities
capabilities = capabilities,
})
require('lspconfig').denols.setup({
cmd = {'deno', 'lsp'},
capabilities = capabilities
cmd = { 'deno', 'lsp' },
capabilities = capabilities,
})
require('lspconfig').vls.setup({
cmd = {'/usr/local/bin/vls'},
capabilities = capabilities
cmd = { '/usr/local/bin/vls' },
capabilities = capabilities,
})
--TODO: clean this up
local runtime_path = vim.split(package.path, ';')
table.insert(runtime_path, "lua/?.lua")
table.insert(runtime_path, "lua/?/init.lua")
table.insert(runtime_path, 'lua/?.lua')
table.insert(runtime_path, 'lua/?/init.lua')
local sumneko_root_path = '/home/ruthenic/lua-language-server/bin/Linux/'
require('lspconfig').sumneko_lua.setup({
cmd = {sumneko_root_path .. "lua-language-server", "-E", sumneko_root_path .. "main.lua"},
cmd = { sumneko_root_path .. 'lua-language-server', '-E', sumneko_root_path .. 'main.lua' },
settings = {
Lua = {
runtime = {
@ -56,16 +56,15 @@ require('lspconfig').sumneko_lua.setup({
path = runtime_path,
},
diagnostics = {
globals = {'vim', 'use'},
globals = { 'vim', 'use' },
},
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
library = vim.api.nvim_get_runtime_file('', true),
},
telemetry = {
enable = false,
},
},
},
capabilities = capabilities
capabilities = capabilities,
})

@ -1,16 +1,15 @@
require("filetype").setup {
require('filetype').setup({
overrides = {
extensions = {v = 'vlang'}
}
}
extensions = { v = 'vlang' },
},
})
require('nvim-treesitter.configs').setup {
require('nvim-treesitter.configs').setup({
highlight = {
enable = true,
disable = {'lua'}
}
}
disable = { 'lua' },
},
})
require('telescope').load_extension('fzf')

Loading…
Cancel
Save