Xcode正在失去颜色并自动完成

时间:2016-08-11 12:58:27

标签: xcode

使用library ieee; use ieee.std_logic_1164.all; use ieee.math_real.all; use ieee.numeric_std.all; entity moving_avg is generic( SAMPLES_COUNT : integer := 32 ); port ( clk_i : in std_logic; rst_n_i : in std_logic; sample_i : in std_logic_vector(11 downto 0); avg_o : out std_logic_vector(11 downto 0) ); end; architecture rtl of moving_avg is type sample_buff_t is array (1 to SAMPLES_COUNT) of std_logic_vector(11 downto 0); signal sample_buffer : sample_buff_t; signal sum : std_logic_vector(31 downto 0); constant wid_shift : integer := integer(ceil(log2(real(SAMPLES_COUNT)))); signal avg_interm_s : std_logic_vector(31 downto 0); begin process (clk_i, rst_n_i) begin if rst_n_i='1' then sample_buffer <= (others => sample_i); sum <= std_logic_vector(unsigned(resize(unsigned(sample_i), sum'length)) sll wid_shift) ; elsif rising_edge(clk_i) then sample_buffer <= sample_i & sample_buffer(1 to SAMPLES_COUNT-1); sum <= std_logic_vector(unsigned(sum) + unsigned(sample_i) - unsigned(sample_buffer(SAMPLES_COUNT))); end if; end process; avg_interm_s <= std_logic_vector((unsigned(sum) srl wid_shift)); avg_o <= avg_interm_s(11 downto 0); end; ,有时随机编辑器变为黑色,没有语法颜色,但更糟糕 - 没有自动完成局部变量和函数。

再次编译时,会恢复颜色,但仍然没有自动完成。 有时会出现编辑器出现问题的消息。

我(5年前)没有遇到过这个问题,而且我读过这个看似不一样的问题,因为它太旧了: Xcode: code loses syntax coloring

这可能看起来很小,但没有auto-complete -its真的很糟糕!

1 个答案:

答案 0 :(得分:1)

这是常见问题。你有机会在Swift中编码吗?我认为它仍然有点不稳定。

但你可以尝试

1)删除模块缓存

  

它与项目的派生数据位于同一文件夹中。当语法突出显示停止工作时,尝试删除它。退出xcode   并删除〜/ Library / Developer / Xcode / DerivedData / ModuleCache 目录

2)清理项目

  

尝试使用⌘+⇧+ K 进行清理,然后使用⌥+⌘+⇧+ K

进行清理

3)重启xcode