More LSPs! formatted some files.
This commit is contained in:
parent
ec3acd5976
commit
dc67e0a5dd
11
init.lua
11
init.lua
|
@ -17,7 +17,7 @@ vim.opt.smartindent = true
|
||||||
|
|
||||||
vim.opt.wrap = false
|
vim.opt.wrap = false
|
||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
ensure_installed = { "c", "cpp", "lua", "zig", "rust" },
|
ensure_installed = { "c", "cpp", "lua", "zig", "go" },
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
auto_install = false,
|
auto_install = false,
|
||||||
highlight = {
|
highlight = {
|
||||||
|
@ -34,9 +34,14 @@ require('treesitter-context').setup {
|
||||||
enable = true,
|
enable = true,
|
||||||
max_lines = 0,
|
max_lines = 0,
|
||||||
min_window_height = 0,
|
min_window_height = 0,
|
||||||
|
patterns = {
|
||||||
|
zig = {
|
||||||
|
'fn',
|
||||||
|
'struct',
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
require('nvim-autopairs').setup{
|
require('nvim-autopairs').setup{}
|
||||||
}
|
|
||||||
require('telescope').setup{
|
require('telescope').setup{
|
||||||
defaults = {
|
defaults = {
|
||||||
},
|
},
|
||||||
|
|
|
@ -37,8 +37,41 @@ end
|
||||||
local lsp_flags = {
|
local lsp_flags = {
|
||||||
debounce_text_changes = 150, --wtf is this
|
debounce_text_changes = 150, --wtf is this
|
||||||
}
|
}
|
||||||
require('lspconfig')['zls'].setup {
|
local lspconfig = require('lspconfig');
|
||||||
|
lspconfig.zls.setup {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags
|
flags = lsp_flags,
|
||||||
|
}
|
||||||
|
lspconfig.gopls.setup{
|
||||||
|
on_attach = on_attach,
|
||||||
|
flags = lsp_flags,
|
||||||
|
}
|
||||||
|
lspconfig.clangd.setup{
|
||||||
|
on_attach = on_attach,
|
||||||
|
flags = lsp_flags,
|
||||||
|
}
|
||||||
|
-- honestly don't need this, telemetry is a big yikes.
|
||||||
|
lspconfig.sumneko_lua.setup{
|
||||||
|
on_attach = on_attach,
|
||||||
|
flags = lsp_flags,
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
runtime = {
|
||||||
|
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
||||||
|
version = 'LuaJIT',
|
||||||
|
},
|
||||||
|
diagnostics = {
|
||||||
|
-- Get the language server to recognize the `vim` global
|
||||||
|
globals = {'vim'},
|
||||||
|
},
|
||||||
|
workspace = {
|
||||||
|
-- Make the server aware of Neovim runtime files
|
||||||
|
library = vim.api.nvim_get_runtime_file("", true),
|
||||||
|
},
|
||||||
|
-- Do not send telemetry data containing a randomized but unique identifier
|
||||||
|
telemetry = {
|
||||||
|
enable = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
--TODO: other languages I care about.
|
|
||||||
|
|
|
@ -3,13 +3,16 @@ vim.cmd [[packadd packer.nvim]]
|
||||||
return require('packer').startup(function(use)
|
return require('packer').startup(function(use)
|
||||||
-- Packer can manage itself
|
-- Packer can manage itself
|
||||||
use 'wbthomason/packer.nvim'
|
use 'wbthomason/packer.nvim'
|
||||||
|
-- themes
|
||||||
use 'sainnhe/everforest'
|
use 'sainnhe/everforest'
|
||||||
use 'sainnhe/sonokai'
|
use 'sainnhe/sonokai'
|
||||||
use { 'nvim-treesitter/nvim-treesitter' }
|
|
||||||
use 'neovim/nvim-lspconfig'
|
|
||||||
use 'nvim-treesitter/nvim-treesitter-context'
|
|
||||||
use { 'nvim-telescope/telescope.nvim', tag = '0.1.0', requires = {{'nvim-lua/plenary.nvim'}} }
|
|
||||||
use { 'windwp/nvim-autopairs' }
|
|
||||||
use { 'tomasr/molokai' }
|
use { 'tomasr/molokai' }
|
||||||
use 'morhetz/gruvbox'
|
use 'morhetz/gruvbox'
|
||||||
|
-- Treesitter
|
||||||
|
use { 'nvim-treesitter/nvim-treesitter' }
|
||||||
|
use 'nvim-treesitter/nvim-treesitter-context'
|
||||||
|
-- Utils
|
||||||
|
use 'neovim/nvim-lspconfig'
|
||||||
|
use { 'nvim-telescope/telescope.nvim', tag = '0.1.0', requires = {{'nvim-lua/plenary.nvim'}} }
|
||||||
|
use { 'windwp/nvim-autopairs' }
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in New Issue