Updated Desktop dotfiles

This commit is contained in:
2024-03-26 15:03:20 -05:00
parent c990f0054f
commit 8bf9cb6892
8 changed files with 64 additions and 20 deletions

View File

@@ -1,4 +1,5 @@
vim.g.mapleader=','
vim.g.maplocalleader=','
vim.keymap.set('n', '<C-h>', '<C-w>h')
vim.keymap.set('n', '<C-j>', '<C-w>j')
@@ -7,6 +8,8 @@ vim.keymap.set('n', '<C-l>', '<C-w>l')
vim.keymap.set('n', '<leader>ff', ':FzfLua files<CR>')
vim.keymap.set('n', '<leader>fb', ':FzfLua buffers<CR>')
vim.keymap.set('n', '<leader>rg', ':FzfLua grep<CR>')
vim.keymap.set('n', '<leader>rg', ':FzfLua grep_project<CR>')
vim.keymap.set('i', '<S-Tab>', '<C-d>')
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)

View File

@@ -17,15 +17,22 @@ local plugins = {
'hrsh7th/nvim-cmp',
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-path',
'rust-lang/rust.vim',
'L3MON4D3/LuaSnip',
{
'windwp/nvim-autopairs',
event = 'InsertEnter',
opts={},
opts = {},
},
{
'kaarmu/typst.vim',
ft = 'typst',
lazy = false,
},
'jalvesaq/Nvim-R',
}
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"

View File

@@ -1,17 +1,41 @@
local capabilities = require('cmp_nvim_lsp').default_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = false;
local lspconfig = require('lspconfig')
local servers = {'ccls', 'rust_analyzer', 'pylsp'}
lspconfig.rust_analyzer.setup {
capabilities = capabilities,
settings = {
["rust-analyzer"] = {
cargo = {
allFeatures = true,
},
imports = {
group = {
enable = false,
},
},
completion = {
postfix = {
enable = false,
},
},
},
},
}
for _, lsp in ipairs(servers) do
local default_servers = {'ccls', 'pylsp', 'typst_lsp', 'r_language_server'}
for _, lsp in ipairs(default_servers) do
lspconfig[lsp].setup {
capabilities = capabilities
}
end
local luasnip = require 'luasnip'
local cmp = require 'cmp'
cmp.setup {
preselect = cmp.PreselectMode.None,
mapping = cmp.mapping.preset.insert({
@@ -32,6 +56,8 @@ cmp.setup {
}),
sources = {
{ name = 'nvim_lsp' },
{ name = 'path' }
{ name = 'path' },
},
}

View File

@@ -31,8 +31,10 @@ vim.opt.wrapscan=true
vim.opt.report=0
vim.opt.list=true
vim.opt.completeopt=menuone,noselect,noinsert
vim.opt.completeopt=menuone,noselect
vim.opt.undodir='~/.vimdid'
vim.opt.undofile=true
vim.g['loaded_perl_provider']=0
vim.g['python3_host_prog']='/usr/bin/python'