Cleanup & fix minor errors
This commit is contained in:
+33
-26
@@ -1,10 +1,12 @@
|
||||
-- Options
|
||||
local o = vim.opt
|
||||
vim.g.mapleader = " "
|
||||
vim.g.loaded_perl_provider = 0
|
||||
vim.g.loaded_ruby_provider = 0
|
||||
vim.g.clipboard = 'osc52'
|
||||
local g = vim.g
|
||||
g.mapleader = " "
|
||||
g.loaded_perl_provider = 0
|
||||
g.loaded_ruby_provider = 0
|
||||
g.clipboard = "osc52"
|
||||
o.number = true
|
||||
o.winborder = "rounded"
|
||||
o.expandtab = true
|
||||
o.shiftwidth = 2
|
||||
o.tabstop = 4
|
||||
@@ -31,17 +33,11 @@ o.mousescroll = "ver:0,hor:0"
|
||||
|
||||
vim.lsp.semantic_tokens.enable = false
|
||||
|
||||
vim.lsp.handlers.hover = function(_, result, ctx, config)
|
||||
config = config or {}
|
||||
config.border = "rounded"
|
||||
return vim.lsp.handlers.hover(_, result, ctx, config)
|
||||
end
|
||||
|
||||
vim.lsp.handlers.signature_help = function(_, result, ctx, config)
|
||||
config = config or {}
|
||||
config.border = "rounded"
|
||||
return vim.lsp.handlers.signature_help(_, result, ctx, config)
|
||||
end
|
||||
vim.diagnostic.config({
|
||||
float = {
|
||||
border = "rounded",
|
||||
},
|
||||
})
|
||||
|
||||
vim.g.rainbow_delimiters = {
|
||||
highlight = {
|
||||
@@ -73,13 +69,31 @@ vim.diagnostic.config({
|
||||
-- LSP config
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
require("lspconfig").lua_ls.setup({
|
||||
vim.lsp.config("lua_ls", {
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = {
|
||||
"vim",
|
||||
},
|
||||
},
|
||||
workspace = {
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
},
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.config("clangd", {
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
require("lspconfig").clangd.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
vim.lsp.enable("lua_ls")
|
||||
vim.lsp.enable("clangd")
|
||||
|
||||
-- Plugins
|
||||
require("picvim").setup({})
|
||||
@@ -124,12 +138,6 @@ require("lualine").setup({
|
||||
},
|
||||
})
|
||||
|
||||
require("nvim-treesitter.configs").setup({
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
})
|
||||
|
||||
require("nvim-cursorline").setup({
|
||||
cursorline = {
|
||||
enable = true,
|
||||
@@ -244,7 +252,6 @@ map("n", "<C-Down>", function()
|
||||
neoscroll.scroll(0.1, { move_cursor = false, duration = 50 })
|
||||
end)
|
||||
|
||||
|
||||
-- Vimscript stuff
|
||||
vim.cmd([[
|
||||
aunmenu PopUp
|
||||
|
||||
Reference in New Issue
Block a user