Add customizations

This commit is contained in:
k-knosala 2024-03-28 21:19:31 +01:00
parent 93fde0556e
commit af39dd4a9f
13 changed files with 151 additions and 28 deletions

View file

@ -91,7 +91,7 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
-- Set to true if you have a Nerd Font installed
vim.g.have_nerd_font = false
vim.g.have_nerd_font = true
-- [[ Setting options ]]
-- See `:help vim.opt`
@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
vim.opt.number = true
-- You can also add relative line numbers, to help with jumping.
-- Experiment for yourself to see if you like it!
-- vim.opt.relativenumber = true
vim.opt.relativenumber = true
-- Enable mouse mode, can be useful for resizing splits for example!
vim.opt.mouse = 'a'
@ -320,6 +320,9 @@ require('lazy').setup({
-- Useful for getting pretty icons, but requires a Nerd Font.
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
--- Get undo history for telescope
'debugloop/telescope-undo.nvim',
},
config = function()
-- Telescope is a fuzzy finder that comes with a lot of different things that
@ -363,6 +366,7 @@ require('lazy').setup({
-- Enable Telescope extensions if they are installed
pcall(require('telescope').load_extension, 'fzf')
pcall(require('telescope').load_extension, 'ui-select')
pcall(require('telescope').load_extension, 'undo')
-- See `:help telescope.builtin`
local builtin = require 'telescope.builtin'
@ -540,7 +544,8 @@ require('lazy').setup({
local servers = {
-- clangd = {},
-- gopls = {},
-- pyright = {},
pyright = {},
ruff_lsp = {},
-- rust_analyzer = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
--
@ -565,6 +570,10 @@ require('lazy').setup({
},
},
},
yamlls = { yaml = {} },
typst_lsp = { { filetypes = { 'typst' } } },
jsonls = { { filetypes = { 'json' } } },
taplo = { filetypes = { 'toml' } },
}
-- Ensure the servers and tools above are installed
@ -593,6 +602,8 @@ require('lazy').setup({
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
require('lspconfig')[server_name].setup(server)
end,
-- rust_analyzer is set up by rustacevim
['rust_analyzer'] = function() end,
},
}
end,
@ -644,12 +655,12 @@ require('lazy').setup({
-- `friendly-snippets` contains a variety of premade snippets.
-- See the README about individual language/framework/plugin snippets:
-- https://github.com/rafamadriz/friendly-snippets
-- {
-- 'rafamadriz/friendly-snippets',
-- config = function()
-- require('luasnip.loaders.from_vscode').lazy_load()
-- end,
-- },
{
'rafamadriz/friendly-snippets',
config = function()
require('luasnip.loaders.from_vscode').lazy_load()
end,
},
},
},
'saadparwaiz1/cmp_luasnip',
@ -728,22 +739,18 @@ require('lazy').setup({
}
end,
},
{ -- You can easily change to a different colorscheme.
-- Change the name of the colorscheme plugin below, and then
-- change the command in the config to whatever the name of that colorscheme is.
--
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
'folke/tokyonight.nvim',
priority = 1000, -- Make sure to load this before all the other start plugins.
'ellisonleao/gruvbox.nvim',
priority = 1000,
init = function()
-- Load the colorscheme here.
-- Like many other themes, this one has different styles, and you could load
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
vim.cmd.colorscheme 'tokyonight-night'
-- You can configure highlights by doing something like:
vim.cmd.hi 'Comment gui=none'
require('gruvbox').setup {
overrides = { SignColumn = { bg = '' } },
}
vim.o.background = 'dark'
vim.cmd.colorscheme 'gruvbox'
end,
},
@ -791,7 +798,7 @@ require('lazy').setup({
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
opts = {
ensure_installed = { 'bash', 'c', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc' },
ensure_installed = { 'bash', 'c', 'html', 'json', 'lua', 'luadoc', 'markdown', 'python', 'rust', 'toml', 'typst', 'vim', 'vimdoc', 'yaml' },
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {
@ -827,16 +834,16 @@ require('lazy').setup({
-- Here are some example plugins that I've included in the Kickstart repository.
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
--
-- require 'kickstart.plugins.debug',
-- require 'kickstart.plugins.indent_line',
-- require 'kickstart.plugins.lint',
require 'kickstart.plugins.debug',
require 'kickstart.plugins.indent_line',
require 'kickstart.plugins.lint',
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
-- This is the easiest way to modularize your config.
--
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
-- { import = 'custom.plugins' },
{ import = 'custom.plugins' },
}, {
ui = {
-- If you are using a Nerd Font: set icons to an empty table which will use the
@ -859,5 +866,9 @@ require('lazy').setup({
},
})
-- Import custom settings
require 'custom.init'
require 'custom.keymap'
-- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et