changed color theme to onedark and add <leader>zz remap for switching
between themesmaster
parent
1c6972cfa5
commit
dbb3f198f7
|
@ -1,91 +0,0 @@
|
|||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"hrsh7th/nvim-cmp",
|
||||
"L3MON4D3/LuaSnip",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"j-hui/fidget.nvim",
|
||||
},
|
||||
|
||||
config = function()
|
||||
local cmp = require('cmp')
|
||||
local cmp_lsp = require("cmp_nvim_lsp")
|
||||
local capabilities = vim.tbl_deep_extend(
|
||||
"force",
|
||||
{},
|
||||
vim.lsp.protocol.make_client_capabilities(),
|
||||
cmp_lsp.default_capabilities())
|
||||
|
||||
require("fidget").setup({})
|
||||
require("mason").setup()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {
|
||||
"lua_ls",
|
||||
"rust_analyzer",
|
||||
"tsserver",
|
||||
},
|
||||
handlers = {
|
||||
function(server_name) -- default handler (optional)
|
||||
|
||||
require("lspconfig")[server_name].setup {
|
||||
capabilities = capabilities
|
||||
}
|
||||
end,
|
||||
|
||||
["lua_ls"] = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
lspconfig.lua_ls.setup {
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim", "it", "describe", "before_each", "after_each" },
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
end,
|
||||
}
|
||||
})
|
||||
|
||||
local cmp_select = { behavior = cmp.SelectBehavior.Select }
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
|
||||
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
|
||||
['<C-y>'] = cmp.mapping.confirm({ select = true }),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' }, -- For luasnip users.
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
|
||||
vim.diagnostic.config({
|
||||
-- update_in_insert = true,
|
||||
float = {
|
||||
focusable = false,
|
||||
style = "minimal",
|
||||
border = "rounded",
|
||||
source = "always",
|
||||
header = "",
|
||||
prefix = "",
|
||||
},
|
||||
})
|
||||
end
|
||||
}
|
|
@ -1,5 +1,11 @@
|
|||
color = color or "tairiki"
|
||||
vim.cmd.colorscheme(color)
|
||||
require('onedark').setup{
|
||||
style = 'warm',
|
||||
toggle_style_key = '<leader>zz',
|
||||
toggle_style_list = { 'dark', 'light' },
|
||||
transparent = false,
|
||||
}
|
||||
require('onedark').load()
|
||||
|
||||
|
||||
-- Making the background transparent
|
||||
-- Guake doen't seem to like it tho and only half the screen is transparent
|
||||
|
|
|
@ -13,12 +13,9 @@ return require('packer').startup(function(use)
|
|||
requires = { {'nvim-lua/plenary.nvim'} }
|
||||
}
|
||||
|
||||
-- tairiki color scheme
|
||||
use 'deparr/tairiki.nvim'
|
||||
require('tairiki').setup {
|
||||
style = 'dark'
|
||||
}
|
||||
require('tairiki').load()
|
||||
|
||||
-- Using Packer
|
||||
use 'navarasu/onedark.nvim'
|
||||
|
||||
use({'nvim-treesitter/nvim-treesitter', {run = ':TSUpdate'}})
|
||||
|
||||
|
|
|
@ -114,6 +114,11 @@ _G.packer_plugins = {
|
|||
path = "/home/niclasthobaben/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
|
||||
url = "https://github.com/nvim-tree/nvim-web-devicons"
|
||||
},
|
||||
["onedark.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/niclasthobaben/.local/share/nvim/site/pack/packer/start/onedark.nvim",
|
||||
url = "https://github.com/navarasu/onedark.nvim"
|
||||
},
|
||||
["packer.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/niclasthobaben/.local/share/nvim/site/pack/packer/start/packer.nvim",
|
||||
|
|
Loading…
Reference in New Issue