neovim changes

This commit is contained in:
James Dixon 2022-12-20 22:39:38 -05:00
parent 2d39fc923f
commit 12bf31273c
6 changed files with 19 additions and 16 deletions

View File

@ -1,8 +1,14 @@
-- init.lua -- -- init.lua --
require('core.options') -- general vim settings
require('core.plugins') require('settings')
require('core.keymaps')
-- vim keymaps
require('keymaps')
-- package manager (packer.nvim)
require('plugins')
require('plugin-config') require('plugin-config')

View File

@ -1,3 +1,5 @@
-- plugin-config/init.lua
-- lsp -- lsp
require('plugin-config.lsp') require('plugin-config.lsp')

View File

@ -45,7 +45,7 @@ end
-- mason - package manager for lsp servers -- mason - package manager for lsp servers
require('mason').setup() require('mason').setup()
local servers = { 'clangd', 'rust_analyzer', 'pyright', 'tsserver', 'sumneko_lua', 'gopls', 'bashls'} local servers = { 'clangd', 'rust_analyzer', 'pyright', 'tsserver', 'sumneko_lua', 'gopls', 'bashls' }
require('mason-lspconfig').setup { require('mason-lspconfig').setup {
ensure_installed = servers, ensure_installed = servers,
} }
@ -66,9 +66,7 @@ end
require('fidget').setup() require('fidget').setup()
-- lua lsp config -- lua lsp config
-- Make runtime files discoverable to the server -- Make runtime files discoverable to the server
local runtime_path = vim.split(package.path, ';') local runtime_path = vim.split(package.path, ';')
table.insert(runtime_path, 'lua/?.lua') table.insert(runtime_path, 'lua/?.lua')
@ -88,10 +86,9 @@ require('lspconfig').sumneko_lua.setup {
diagnostics = { diagnostics = {
globals = { 'vim' }, globals = { 'vim' },
}, },
workspace = { library = vim.api.nvim_get_runtime_file('', true) }, workspace = { library = vim.api.nvim_get_runtime_file('', true), checkThirdParty = false, },
-- Do not send telemetry data containing a randomized but unique identifier -- Do not send telemetry data containing a randomized but unique identifier
telemetry = { enable = false }, telemetry = { enable = false },
}, },
}, },
} }

View File

@ -5,7 +5,8 @@
local install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim' local install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim'
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.fn.execute('!git clone https://github.com/wbthomason/packer.nvim ' .. install_path) vim.fn.execute('!git clone https://github.com/wbthomason/packer.nvim ' .. install_path)
vim.cmd [[packadd packer.nvim]]
vim.cmd('packadd packer.nvim')
end end
require('packer').startup(function(use) require('packer').startup(function(use)
@ -45,7 +46,6 @@ require('packer').startup(function(use)
tag = 'nightly' tag = 'nightly'
} }
-- * vanilla vim plugins * -- -- * vanilla vim plugins * --
-- normal mode keybinds -- normal mode keybinds

View File

@ -2,6 +2,10 @@
-- general settings -- general settings
-- --
-- vim cmds
vim.cmd('syntax enable')
vim.cmd('filetype plugin indent on')
-- encoding/format -- encoding/format
vim.opt.encoding = 'utf-8' vim.opt.encoding = 'utf-8'
vim.opt.fileformats = 'unix,dos,mac' vim.opt.fileformats = 'unix,dos,mac'
@ -46,9 +50,3 @@ vim.opt.termguicolors = true
vim.opt.number = true vim.opt.number = true
vim.opt.wrap = true vim.opt.wrap = true
vim.opt.listchars = {eol = '', tab = '', trail = '·'} vim.opt.listchars = {eol = '', tab = '', trail = '·'}
-- vim cmds
vim.cmd [[
syntax enable
filetype plugin indent on
]]