-- This will need some refactoring as it is mostly a -- copy and paste from the previous single-file .vim config require'lspconfig'.rust_analyzer.setup{} require'lspconfig'.texlab.setup{} require'lspconfig'.svls.setup{} require'lspconfig'.pylsp.setup{ settings = { formatCommand = {"black"}, pylsp = { plugins = { jedai_completion = { fuzzy = true }, pyflakes = { enabled = true }, pylsp_mypy = { enabled = true } } } } } require'nvim-treesitter.configs'.setup { ensure_installed = { }, auto_install = false, highlight = { enable = true, additional_vim_regex_highlighting = false, }, } -- Add additional capabilities supported by nvim-cmp local capabilities = require("cmp_nvim_lsp").default_capabilities() local lspconfig = require('lspconfig') -- Enable some language servers with the additional completion capabilities offered by nvim-cmp local servers = { 'clangd', 'glsl_analyzer', 'rust_analyzer', 'tinymist', 'vhdl_ls', 'vtsls' } for _, lsp in ipairs(servers) do lspconfig[lsp].setup { -- on_attach = my_custom_on_attach, capabilities = capabilities, } end -- luasnip setup local luasnip = require 'luasnip' -- nvim-cmp setup local cmp = require 'cmp' cmp.setup { snippet = { expand = function(args) luasnip.lsp_expand(args.body) end, }, mapping = cmp.mapping.preset.insert({ [''] = cmp.mapping.scroll_docs(-4), -- Up [''] = cmp.mapping.scroll_docs(4), -- Down -- C-b (back) C-f (forward) for snippet placeholder navigation. [''] = cmp.mapping.complete(), [''] = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Replace, select = true, }, [''] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() elseif luasnip.expand_or_jumpable() then luasnip.expand_or_jump() else fallback() end end, { 'i', 's' }), [''] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() elseif luasnip.jumpable(-1) then luasnip.jump(-1) else fallback() end end, { 'i', 's' }), }), sources = { { name = 'nvim_lsp' }, { name = 'luasnip' }, }, } --[[ u.-*'M'*-.u x` _____ `x o` _| ___| `o , | |___ , 3 |_ | E ' | _ | ' o, |_| |_| ,o x". ."x n"--.W.--"n Kiloroy Was Here ]] -- Funky plugins require("conform").setup({ formatters_by_ft = { css = { "prettier", }, html = { "prettier", }, javascript = { "prettier", }, python = { "black" }, }, format_on_save = { timeout_ms = 500, lsp_format = "fallback", }, }) require("bufferline").setup({ options = { always_show_bufferline = true, show_buffer_close_icons = false, separator_style = "slope", style_preset = { require("bufferline").style_preset.no_italic, }, offsets = { { filetype = "neo-tree", text = "File Explorer", highlight = "Directory", text_align = "left", }, }, },}) require("gitsigns").setup() require("ibl").setup() require("mini.comment").setup() require("mini.icons").setup() require("neo-tree").setup() require("nvim-web-devicons").setup() require("render-markdown").setup() require("telescope").setup() require("toggleterm").setup{ direction = 'float', float_opts = { border = 'curved', }, } require("which-key").setup({ global = false }) require("spaceman").setup({ workspaces = { "/etc/nixos", { "config", "/etc/nixos/config/" }, { "home", "~/" }, }, directories = { "~/Documents/Classes", "~/Documents/Repos", "~/Documents/Repos/ExtremeHeatTransfer", }, use_default_keymaps = true, hooks = { before_move = "Neotree close", } })