--- /dev/null
+vim.g.mapleader = ','
+vim.g.maplocalleader = '\\'
+
+local Plug = vim.fn['plug#']
+vim.call('plug#begin')
+
+Plug 'junegunn/vim-plug'
+
+-- Language Server protocol config
+Plug 'neovim/nvim-lspconfig'
+
+-- Colorschemes
+Plug 'shaunsingh/solarized.nvim'
+
+-- Syntax Highlighting and folding
+Plug('nvim-treesitter/nvim-treesitter', {['do'] = ':TSUpdate'})
+
+Plug 'nvim-lualine/lualine.nvim'
+
+-- Tags
+Plug 'liuchengxu/vista.vim'
+
+-- Navigation
+Plug 'preservim/nerdtree'
+
+-- Telescope finding shit
+Plug 'nvim-lua/plenary.nvim'
+Plug('nvim-telescope/telescope.nvim', {['branch'] = '0.1.x'})
+Plug('nvim-telescope/telescope-fzf-native.nvim', {['do'] = 'make' })
+Plug 'doctorfree/cheatsheet.nvim'
+
+-- Omnisharp
+Plug 'Hoffs/omnisharp-extended-lsp.nvim'
+
+-- Git
+Plug 'tpope/vim-fugitive'
+Plug 'tommcdo/vim-fubitive'
+
+-- Misc
+Plug 'lukas-reineke/indent-blankline.nvim'
+
+vim.call('plug#end')
+
+require'lspconfig'.pylsp.setup{
+ settings = { pylsp = {
+ plugins = {
+ flake8 = {
+ enabled = true,
+ maxLineLength = 100,
+ },
+ pycodestyle = { enabled = false, },
+ pyflakes = { enabled = false, },
+ rope_autoimport = { enabled = true, },
+ },
+ configurationSources = 'flake8'
+ }}
+}
+require'lspconfig'.omnisharp.setup{
+ cmd = { "dotnet", "/usr/lib/omnisharp-roslyn/OmniSharp.dll" },
+ enable_roslyn_analyzers = false,
+ handlers = {
+ ["textDocument/definition"] = require('omnisharp_extended').handler,
+ },
+}
+
+vim.diagnostic.config{
+ float = {
+ source = 'always',
+ }
+}
+
+-- Global mappings.
+-- See `:help vim.diagnostic.*` for documentation on any of the below functions
+vim.keymap.set('n', '<space>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', '<space>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 <c-x><c-o>
+ vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
+
+ -- Buffer local mappings.
+ -- See `:help vim.lsp.*` for documentation on any of the below functions
+ local opts = { buffer = ev.buf }
+ vim.keymap.set('n', '<leader>gd', vim.lsp.buf.definition, opts)
+ vim.keymap.set('n', '<leader>K', vim.lsp.buf.hover, opts)
+ vim.keymap.set('n', '<leader>k', vim.lsp.buf.signature_help, opts)
+ vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, opts)
+ vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, opts)
+ vim.keymap.set({ 'n', 'v' }, '<leader>ca', vim.lsp.buf.code_action, opts)
+ vim.keymap.set('n', '<space>f', function()
+ vim.lsp.buf.format { async = true }
+ end, opts)
+ end,
+})
+
+
+-- Tressiter for syntax highlighting and folding
+require'nvim-treesitter.configs'.setup {
+ ensure_installed = { "c", "lua", "vim", "vimdoc", "python", "html" },
+ auto_install = true,
+
+ highlight = { enable = true, },
+ indent = { enable = true, },
+}
+
+vim.opt.foldmethod = "expr"
+vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
+
+
+-- Tag bar
+vim.g.vista_default_executive = 'nvim_lsp'
+vim.keymap.set('n', '<F8>', ':Vista!!<CR>')
+
+
+-- Colourscheme
+vim.opt.background = 'light'
+
+vim.g.solarized_borders = true
+
+
+-- This setting needs to be set before solarized is loaded
+-- so it can't go into ginit.vim, since that is loaded after
+-- this file
+if vim.fn.has('gui_running') == 0 then
+ vim.g.solarized_disable_background = true
+else
+ vim.g.solarized_disable_background = false
+end
+require('solarized').set()
+
+
+-- Lualine (powerline like thing) setup
+require('lualine').setup {
+ options = {
+ theme = 'solarized'
+ }
+}
+
+
+-- Nerdree mappings
+vim.keymap.set('n', '<C-n>', ':NERDTreeToggle<CR>')
+vim.keymap.set('n', '<C-f>', ':NERDTreeFind<CR>')
+
+
+-- Telescope
+require('telescope').setup{
+ extensions = {
+ fzf = {
+ fuzzy = true, -- false will only do exact matching
+ override_generic_sorter = true, -- override the generic sorter
+ override_file_sorter = true, -- override the file sorter
+ case_mode = "smart_case",
+ }
+ },
+ pickers = {
+ find_files = {
+ theme = "dropdown",
+ },
+ live_grep = {
+ theme = "dropdown",
+ },
+ lsp_references = {
+ theme = "dropdown",
+ },
+ }
+}
+local tele_builtin = require('telescope.builtin')
+vim.keymap.set('n', '<leader>ff', tele_builtin.find_files, {})
+vim.keymap.set('n', '<leader>fg', tele_builtin.live_grep, {})
+vim.keymap.set('n', '<leader>gr', tele_builtin.lsp_references, {})
+require('telescope').load_extension('fzf')
+
+
+-- General Setup
+-- Relative line numbering
+vim.opt.relativenumber = true
+vim.opt.number = true
+-- Ruler at 80 and 100 cols
+vim.o.colorcolumn = "80,100"
+
+-- Show Spaces, newlines tabs etc
+vim.opt.listchars = {
+ trail = '•',
+ extends = '>',
+ precedes = '<',
+ nbsp = '␣',
+ eol = '↲',
+ tab = '→,',
+}
+vim.opt.list = true
+
+-- Clear highlights from search with Ctrl-l
+vim.keymap.set('n', '<C-l>', ':noh<CR>')
+
+
+-- Indentline
+require("ibl").setup()