-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
init.vim #1
Comments
" view if has("gui_vimr") || has("gui_running") set complete-=i " file format set autoindent " Note, perl automatically sets foldmethod in the syntax file " set laststatus=2 " search & file navagation shortcuts nnoremap :Ag -s -f -w " toolkit function! g:ChmodOnWrite() autocmd! bufwritepost vimrc source % " auto save for every second " if has("multi_byte") " find files and populate the quickfix list execute pathogen#infect() " ------------------------------------ " cd ~/.vim/bundle " Bi-directional find motion " Turn on case sensitive feature " JK motions: Line motions |
local vimrc = vim.fn.stdpath("config") .. "/vimrc.vim"
vim.cmd.source(vimrc)
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup(
({
{'nvim-telescope/telescope.nvim', dependencies = { 'nvim-lua/plenary.nvim' }},
'mfussenegger/nvim-jdtls',
'williamboman/mason.nvim',
"williamboman/mason-lspconfig.nvim",
"neovim/nvim-lspconfig",
'nvim-treesitter/nvim-treesitter',
})
)
require("mason").setup()
require("mason-lspconfig").setup()
require'lspconfig'.pyright.setup{}
require'lspconfig'.tsserver.setup{}
vim.keymap.set('n', '', require'telescope.builtin'.live_grep)
-- Global mappings.
-- See
:help vim.diagnostic.*
for documentation on any of the below functionsvim.keymap.set('n', 'e', vim.diagnostic.open_float)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
vim.keymap.set('n', 'q', vim.diagnostic.setloclist)
-- Use LspAttach autocommand to only map the following keys
-- after the language server attaches to the current buffer
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
callback = function(ev)
-- Enable completion triggered by
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
end,
})
The text was updated successfully, but these errors were encountered: