cleaned up all neovim things and added rust and go
forgot go keybinds ig
This commit is contained in:
@@ -1 +1,18 @@
|
||||
return { "catppuccin/nvim", name = "catppuccin", priority = 1000 }
|
||||
return {
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
priority = 1000,
|
||||
opts = {
|
||||
integrations = {
|
||||
cmp = false,
|
||||
gitsigns = true,
|
||||
nvimtree = true,
|
||||
treesitter = true,
|
||||
notify = false,
|
||||
mini = {
|
||||
enabled = false,
|
||||
indentscope_color = "",
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
11
packages/nvim/lua/plugins/conform.lua
Normal file
11
packages/nvim/lua/plugins/conform.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
'stevearc/conform.nvim',
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
dart = { "dart_format" },
|
||||
lua = { "stylua" },
|
||||
rust = { "rustfmt" },
|
||||
go = { "gofmt" },
|
||||
},
|
||||
},
|
||||
}
|
||||
9
packages/nvim/lua/plugins/dioxus.lua
Normal file
9
packages/nvim/lua/plugins/dioxus.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
"mrxiaozhuox/dioxus.nvim",
|
||||
opts = {
|
||||
format = {
|
||||
split_line_attributes = true,
|
||||
},
|
||||
},
|
||||
ft = "rust",
|
||||
}
|
||||
@@ -7,4 +7,90 @@ return {
|
||||
'stevearc/dressing.nvim', -- optional for vim.ui.select
|
||||
},
|
||||
config = true,
|
||||
opts = {
|
||||
ui = {
|
||||
-- the border type to use for all floating windows, the same options/formats
|
||||
-- used for ":h nvim_open_win" e.g. "single" | "shadow" | {<table-of-eight-chars>}
|
||||
border = "rounded",
|
||||
-- This determines whether notifications are show with `vim.notify` or with the plugin's custom UI
|
||||
-- please note that this option is eventually going to be deprecated and users will need to
|
||||
-- depend on plugins like `nvim-notify` instead.
|
||||
notification_style = 'plugin'
|
||||
},
|
||||
decorations = {
|
||||
statusline = {
|
||||
-- set to true to be able use the 'flutter_tools_decorations.app_version' in your statusline
|
||||
-- this will show the current version of the flutter app from the pubspec.yaml file
|
||||
app_version = false,
|
||||
-- set to true to be able use the 'flutter_tools_decorations.device' in your statusline
|
||||
-- this will show the currently running device if an application was started with a specific
|
||||
-- device
|
||||
device = true,
|
||||
-- set to true to be able use the 'flutter_tools_decorations.project_config' in your statusline
|
||||
-- this will show the currently selected project configuration
|
||||
project_config = false,
|
||||
}
|
||||
},
|
||||
debugger = { -- integrate with nvim dap + install dart code debugger
|
||||
enabled = true,
|
||||
-- if empty dap will not stop on any exceptions, otherwise it will stop on those specified
|
||||
-- see |:help dap.set_exception_breakpoints()| for more info
|
||||
exception_breakpoints = { "uncaught" },
|
||||
-- Whether to call toString() on objects in debug views like hovers and the
|
||||
-- variables list.
|
||||
-- Invoking toString() has a performance cost and may introduce side-effects,
|
||||
-- although users may expected this functionality. null is treated like false.
|
||||
evaluate_to_string_in_debug_views = true,
|
||||
},
|
||||
flutter_lookup_cmd = nil, -- example "dirname $(which flutter)" or "asdf where flutter"
|
||||
root_patterns = { ".git", "pubspec.yaml" }, -- patterns to find the root of your flutter project
|
||||
fvm = false, -- takes priority over path, uses <workspace>/.fvm/flutter_sdk if enabled
|
||||
widget_guides = {
|
||||
enabled = true,
|
||||
},
|
||||
closing_tags = {
|
||||
highlight = "ErrorMsg", -- highlight for the closing tag
|
||||
prefix = ">", -- character to use for close tag e.g. > Widget
|
||||
priority = 10, -- priority of virtual text in current line
|
||||
-- consider to configure this when there is a possibility of multiple virtual text items in one line
|
||||
-- see `priority` option in |:help nvim_buf_set_extmark| for more info
|
||||
enabled = true -- set to false to disable
|
||||
},
|
||||
dev_log = {
|
||||
enabled = true,
|
||||
filter = nil, -- optional callback to filter the log
|
||||
-- takes a log_line as string argument; returns a boolean or nil;
|
||||
-- the log_line is only added to the output if the function returns true
|
||||
notify_errors = false, -- if there is an error whilst running then notify the user
|
||||
open_cmd = "15split", -- command to use to open the log buffer
|
||||
focus_on_open = true, -- focus on the newly opened log window
|
||||
},
|
||||
dev_tools = {
|
||||
autostart = false, -- autostart devtools server if not detected
|
||||
auto_open_browser = false, -- Automatically opens devtools in the browser
|
||||
},
|
||||
outline = {
|
||||
open_cmd = "30vnew", -- command to use to open the outline buffer
|
||||
auto_open = false -- if true this will open the outline automatically when it is first populated
|
||||
},
|
||||
lsp = {
|
||||
color = { -- show the derived colours for dart variables
|
||||
enabled = true, -- whether or not to highlight color variables at all, only supported on flutter >= 2.10
|
||||
background = true, -- highlight the background
|
||||
background_color = nil, -- required, when background is transparent (i.e. background_color = { r = 19, g = 17, b = 24},)
|
||||
foreground = false, -- highlight the foreground
|
||||
virtual_text = true, -- show the highlight using virtual text
|
||||
virtual_text_str = "■", -- the virtual text character to highlight
|
||||
},
|
||||
-- see the link below for details on each option:
|
||||
-- https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/tool/lsp_spec/README.md#client-workspace-configuration
|
||||
settings = {
|
||||
showTodos = true,
|
||||
completeFunctionCalls = true,
|
||||
renameFilesWithClasses = "prompt", -- "always"
|
||||
enableSnippets = true,
|
||||
updateImportsOnRename = true, -- Whether to update imports and other directives when files are renamed. Required for `FlutterRename` command.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
25
packages/nvim/lua/plugins/go.lua
Normal file
25
packages/nvim/lua/plugins/go.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
return {
|
||||
"ray-x/go.nvim",
|
||||
dependencies = { -- optional packages
|
||||
"neovim/nvim-lspconfig",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
opts = {
|
||||
-- lsp_keymaps = false,
|
||||
-- other options
|
||||
},
|
||||
config = function(lp, opts)
|
||||
require("go").setup(opts)
|
||||
local format_sync_grp = vim.api.nvim_create_augroup("GoFormat", {})
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
pattern = "*.go",
|
||||
callback = function()
|
||||
require('go.format').goimports()
|
||||
end,
|
||||
group = format_sync_grp,
|
||||
})
|
||||
end,
|
||||
event = {"CmdlineEnter"},
|
||||
ft = {"go", 'gomod'},
|
||||
build = ':lua require("go.install").update_all_sync()' -- if you need to install/update all binaries
|
||||
}
|
||||
@@ -7,7 +7,8 @@ return {
|
||||
servers = {
|
||||
lua_ls = {},
|
||||
nil_ls = {},
|
||||
rust_analyzer = {}
|
||||
-- rust_analyzer = {},
|
||||
gopls = {},
|
||||
}
|
||||
},
|
||||
config = function(_, opts)
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
return
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = function()
|
||||
local keys = require("lazyvim.plugins.lsp.keymaps").get()
|
||||
-- change a keymap
|
||||
keys[#keys + 1] = { "K", "<cmd>echo 'hello'<cr>" }
|
||||
-- disable a keymap
|
||||
keys[#keys + 1] = { "K", false }
|
||||
-- add a keymap
|
||||
keys[#keys + 1] = { "H", "<cmd>echo 'hello'<cr>" }
|
||||
end,
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
return {
|
||||
'mrcjkb/rustaceanvim',
|
||||
version = '^5', -- Recommended
|
||||
version = '^6', -- Recommended
|
||||
lazy = false, -- This plugin is already lazy
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ return {
|
||||
'nanozuki/tabby.nvim',
|
||||
-- event = 'VimEnter', -- if you want lazy load, see below
|
||||
dependencies = 'nvim-tree/nvim-web-devicons',
|
||||
config = function()
|
||||
-- configs...
|
||||
end,
|
||||
opts = {
|
||||
preset = "tab_only"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,17 @@ return {
|
||||
event = "VeryLazy", -- Or `LspAttach`
|
||||
priority = 1000, -- needs to be loaded in first
|
||||
config = function()
|
||||
require('tiny-inline-diagnostic').setup()
|
||||
require('tiny-inline-diagnostic').setup({
|
||||
preset = "ghost";
|
||||
options = {
|
||||
use_icons_from_diagnostic = true,
|
||||
multilines = {
|
||||
enabled = true,
|
||||
},
|
||||
show_all_diags_on_cursorline = false,
|
||||
enable_on_insert = true,
|
||||
}
|
||||
})
|
||||
vim.diagnostic.config({ virtual_text = false }) -- Only if needed in your configuration, if you already have native LSP diagnostics
|
||||
end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user