fixing set issue

main
spinach 2 years ago
commit bd6699a1c6

8
.gitmodules vendored

@ -7,9 +7,6 @@
[submodule "telescope.nvim"]
path = site/pack/filebrowser/start/telescope.nvim
url = https://github.com/nvim-telescope/telescope.nvim.git
[submodule "vim-go"]
path = site/pack/golang/opt/vim-go
url = https://github.com/fatih/vim-go.git
[submodule "markdown-preview.nvim"]
path = site/pack/markdown/start/markdown-preview.nvim
url = https://github.com/iamcco/markdown-preview.nvim.git
@ -40,6 +37,9 @@
[submodule "nvim-lspconfig"]
path = site/pack/lsp/start/nvim-lspconfig
url = https://github.com/neovim/nvim-lspconfig.git
[submodule "site/pack/qol/start/harpoon"]
[submodule "vim-go"]
path = site/pack/golang/start/vim-go
url = https://github.com/fatih/vim-go.git
[submodule "harpoon"]
path = site/pack/qol/start/harpoon
url = https://github.com/ThePrimeagen/harpoon.git

@ -2,6 +2,7 @@ require('keymap')
require('plugins')
require('calcurse')
require('i3conf')
require('go')
-- prevent cursor override
vim.cmd('set guicursor=')
@ -9,6 +10,11 @@ vim.cmd('set guicursor=')
vim.cmd('filetype plugin indent on')
vim.cmd('set ts=4 sts=4 sw=4 expandtab')
-- clipboard
vim.cmd('set clipboard+=unnamedplus')
vim.keymap.set('n', '<leader>Y', '"+y')
vim.keymap.set('n', '<leader>P', '"+p')
-- hybrid numbering
vim.opt.relativenumber = true
vim.opt.number = true
@ -33,6 +39,7 @@ Transparent = true
-- timeouts
vim.opt.ttimeout = true
vim.opt.ttimeoutlen = 100
vim.o.updatetime = 250
-- nvim tree basics
@ -50,7 +57,7 @@ local lspconfig = require('lspconfig')
-- Go
lspconfig.gopls.setup{
cmd = {"gopls", "server"},
cmd = {"gopls", "serve"},
filetypes = {"go", "gomod"},
settings = {
gopls = {
@ -86,8 +93,45 @@ lspconfig.pylsp.setup{}
-- TypeScript
lspconfig.tsserver.setup{}
-- lsp mappingsd
-- Fix virtual text going off screen
vim.diagnostic.config({
virtual_text = false,
signs = true,
underline = true,
update_in_insert = false,
severity_sort = false,
})
vim.api.nvim_create_autocmd('LspAttach', {
callback = function(ev)
-- custom colors
vim.cmd('hi DiagnosticUnderlineError cterm=undercurl guisp=Red')
-- key mappings
local opts = { buffer = ev.buf,}
-- error viewing
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, opts)
vim.keymap.set('n', '<leader>[d', vim.diagnostic.goto_prev, opts)
vim.keymap.set('n', '<leader>]d', vim.diagnostic.goto_next, opts)
-- def viewing/rename
vim.keymap.set('n', '<leader>gD', vim.lsp.buf.declaration, opts)
vim.keymap.set('n', '<leader>gd', vim.lsp.buf.definition, opts)
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, opts)
vim.keymap.set('n', '<leader>H', vim.lsp.buf.hover, opts)
-- auto hover for error viewing
vim.api.nvim_create_autocmd("CursorHold", {
callback = function()
opts = {
buffer = ev.buf,
focusable = false,
border = 'rounded',
source = 'always',
prefix = ' ',
scope = 'cursor',
close_events = { "BufLeave","CursorMoved","InsertEnter","FocusLost" },
}
vim.diagnostic.open_float(nil, opts)
end
})
end,
})

@ -1,5 +1,3 @@
vim.cmd('packadd vim-go')
vim.g.go_hightlight_types = 1
vim.g.go_hightlight_fields = 1
vim.g.go_hightlight_functions = 1

@ -0,0 +1 @@
Subproject commit a494378f6c106a97e39c62b493c14476f9f7de4f
Loading…
Cancel
Save