mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 08:53:56 -05:00
a bunch of neovim configuration
This commit is contained in:
parent
1caa58038d
commit
bb2057f5d5
3 changed files with 8 additions and 27 deletions
|
|
@ -33,6 +33,9 @@ vim.g.loaded_netrwPlugin = 1
|
||||||
require("nvim-tree").setup {
|
require("nvim-tree").setup {
|
||||||
open_on_setup = true,
|
open_on_setup = true,
|
||||||
sort_by = "case_sensitive",
|
sort_by = "case_sensitive",
|
||||||
|
view = {
|
||||||
|
adaptive_size = true,
|
||||||
|
},
|
||||||
actions = {
|
actions = {
|
||||||
open_file = {
|
open_file = {
|
||||||
quit_on_open = true,
|
quit_on_open = true,
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,3 @@
|
||||||
local lspc = require'lspconfig'
|
local lspc = require("lspconfig")
|
||||||
|
lspc.rust_analyzer.setup{}
|
||||||
local buf_map = function(bufnr, mode, lhs, rhs, opts)
|
lspc.clangd.setup{}
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, mode, lhs, rhs, opts or {
|
|
||||||
silent = true,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
lspc.tsserver.setup({
|
|
||||||
on_attach = function(client, bufnr)
|
|
||||||
client.resolved_capabilities.document_formatting = false
|
|
||||||
client.resolved_capabilities.document_range_formatting = false
|
|
||||||
local ts_utils = require("nvim-lsp-ts-utils")
|
|
||||||
|
|
||||||
ts_utils.setup({})
|
|
||||||
ts_utils.setup_client(client)
|
|
||||||
|
|
||||||
buf_map(bufnr, "n", "gs", ":TSLspOrganize<CR>")
|
|
||||||
buf_map(bufnr, "n", "gi", ":TSLspRenameFile<CR>")
|
|
||||||
buf_map(bufnr, "n", "go", ":TSLspImportAll<CR>")
|
|
||||||
|
|
||||||
on_attach(client, bufnr)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,8 @@ vim-moonfly = pkgs.vimUtils.buildVimPlugin {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
home.packages = with pkgs; [rustc cargo rust-analyzer clang-tools];
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
viAlias = true;
|
viAlias = true;
|
||||||
|
|
@ -68,3 +66,4 @@ in
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue